Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 4 |
Menu | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 4 |
getDescription | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
isLocked | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\system\Entity\Menu. | |
*/ | |
namespace Drupal\system\Entity; | |
use Drupal\Core\Config\Entity\ConfigEntityBase; | |
use Drupal\system\MenuInterface; | |
/** | |
* Defines the Menu configuration entity class. | |
* | |
* @ConfigEntityType( | |
* id = "menu", | |
* label = @Translation("Menu"), | |
* handlers = { | |
* "access" = "Drupal\system\MenuAccessControlHandler" | |
* }, | |
* admin_permission = "administer menu", | |
* entity_keys = { | |
* "id" = "id", | |
* "label" = "label" | |
* }, | |
* config_export = { | |
* "id", | |
* "label", | |
* "description", | |
* "locked", | |
* } | |
* ) | |
*/ | |
class Menu extends ConfigEntityBase implements MenuInterface { | |
/** | |
* The menu machine name. | |
* | |
* @var string | |
*/ | |
protected $id; | |
/** | |
* The human-readable name of the menu entity. | |
* | |
* @var string | |
*/ | |
protected $label; | |
/** | |
* The menu description. | |
* | |
* @var string | |
*/ | |
protected $description; | |
/** | |
* The locked status of this menu. | |
* | |
* @var bool | |
*/ | |
protected $locked = FALSE; | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getDescription() { | |
return $this->description; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function isLocked() { | |
return (bool) $this->locked; | |
} | |
} |