Skip to content
Menu.php 1.28 KiB
Newer Older
 * Contains \Drupal\system\Entity\Menu.

use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Entity\EntityStorageInterface;

/**
 * Defines the Menu configuration entity class.
 *
 *   id = "menu",
 *   label = @Translation("Menu"),
 *     "access" = "Drupal\system\MenuAccessControlHandler"
 *   admin_permission = "administer menu",
 *   },
 *   config_export = {
 *     "id",
 *     "label",
 *     "description",
 *     "locked",
class Menu extends ConfigEntityBase implements MenuInterface {

  /**
   * The human-readable name of the menu entity.
   *
   * @var string
   */
  /**
   * 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;
  }