comparison core/modules/system/src/Entity/Menu.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 129ea1e6d783
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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 }