Newer
Older
Angie Byron
committed
<?php
/**
* @file
* Contains \Drupal\system\Entity\Menu.
Angie Byron
committed
*/
namespace Drupal\system\Entity;
Angie Byron
committed
use Drupal\Core\Config\Entity\ConfigEntityBase;
catch
committed
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\system\MenuInterface;
Angie Byron
committed
/**
* Defines the Menu configuration entity class.
*
Alex Pott
committed
* @ConfigEntityType(
Angie Byron
committed
* id = "menu",
* label = @Translation("Menu"),
Alex Pott
committed
* handlers = {
* "access" = "Drupal\system\MenuAccessControlHandler"
* admin_permission = "administer menu",
Angie Byron
committed
* entity_keys = {
* "id" = "id",
Dries Buytaert
committed
* "label" = "label"
* },
* config_export = {
* "id",
* "label",
* "description",
* "locked",
Angie Byron
committed
* }
* )
*/
class Menu extends ConfigEntityBase implements MenuInterface {
Angie Byron
committed
/**
* The menu machine name.
*
* @var string
*/
protected $id;
Angie Byron
committed
/**
* The human-readable name of the menu entity.
*
* @var string
*/
protected $label;
Angie Byron
committed
/**
* The menu description.
*
* @var string
*/
protected $description;
Angie Byron
committed
Angie Byron
committed
/**
* The locked status of this menu.
*
* @var bool
*/
protected $locked = FALSE;
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this->description;
}
Angie Byron
committed
/**
* {@inheritdoc}
*/
public function isLocked() {
return (bool) $this->locked;
}