e7fbb47fbfc92cf7793e596c1d8a9c120b3e1ffa
[yaffs-website] / web / core / modules / system / src / Entity / Menu.php
1 <?php
2
3 namespace Drupal\system\Entity;
4
5 use Drupal\Core\Config\Entity\ConfigEntityBase;
6 use Drupal\system\MenuInterface;
7
8 /**
9  * Defines the Menu configuration entity class.
10  *
11  * @ConfigEntityType(
12  *   id = "menu",
13  *   label = @Translation("Menu"),
14  *   handlers = {
15  *     "access" = "Drupal\system\MenuAccessControlHandler"
16  *   },
17  *   admin_permission = "administer menu",
18  *   entity_keys = {
19  *     "id" = "id",
20  *     "label" = "label"
21  *   },
22  *   config_export = {
23  *     "id",
24  *     "label",
25  *     "description",
26  *     "locked",
27  *   }
28  * )
29  */
30 class Menu extends ConfigEntityBase implements MenuInterface {
31
32   /**
33    * The menu machine name.
34    *
35    * @var string
36    */
37   protected $id;
38
39   /**
40    * The human-readable name of the menu entity.
41    *
42    * @var string
43    */
44   protected $label;
45
46   /**
47    * The menu description.
48    *
49    * @var string
50    */
51   protected $description;
52
53   /**
54    * The locked status of this menu.
55    *
56    * @var bool
57    */
58   protected $locked = FALSE;
59
60   /**
61    * {@inheritdoc}
62    */
63   public function getDescription() {
64     return $this->description;
65   }
66
67   /**
68    * {@inheritdoc}
69    */
70   public function isLocked() {
71     return (bool) $this->locked;
72   }
73
74 }