MenuLinkContentAccessControlHandler::createInstance

public static MenuLinkContentAccessControlHandler::createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) Instantiates a new instance of this entity handler. This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton. Parameters \Symfony

MenuLinkContentAccessControlHandler::checkAccess

protected MenuLinkContentAccessControlHandler::checkAccess(EntityInterface $entity, $operation, AccountInterface $account) Performs access checks. This method is supposed to be overwritten by extending classes that do their own custom access checking. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for which to check access. string $operation: The entity operation. Usually one of 'view', 'view label', 'update' or 'delete'. \Drupal\Core\Session\AccountInterface $account: The

MenuLinkContentAccessControlHandler::$accessManager

The access manager to check routes by name. Type: \Drupal\Core\Access\AccessManagerInterface File core/modules/menu_link_content/src/MenuLinkContentAccessControlHandler.php, line 24 Class MenuLinkContentAccessControlHandler Defines the access control handler for the user entity type. Namespace Drupal\menu_link_content Code protected $accessManager;

MenuLinkContentAccessControlHandler

Defines the access control handler for the user entity type. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityAccessControlHandler implements EntityAccessControlHandlerInterfaceclass \Drupal\menu_link_content\MenuLinkContentAccessControlHandler implements EntityHandlerInterface File core/modules/menu_link_content/src/MenuLinkContentAccessControlHandler.php, line 17 Namespace Drupal\menu_link_c

MenuLinkContent::setRequiresRediscovery

public MenuLinkContent::setRequiresRediscovery($rediscovery) Flags a link as requiring rediscovery. Parameters bool $rediscovery: Whether or not the link requires rediscovery. Return value $this The instance on which the method was called. Overrides MenuLinkContentInterface::setRequiresRediscovery See also \Drupal\menu_link_content\MenuLinkContentInterface::requiresRediscovery() File core/modules/menu_link_content/src/Entity/MenuLinkContent.php, line 377 Class MenuLinkContent Defines th

MenuLinkContent::requiresRediscovery

public MenuLinkContent::requiresRediscovery() Returns whether the menu link requires rediscovery. If a menu-link points to a user-supplied path such as /blog then the route this resolves to needs to be rediscovered as the module or route providing a given path might change over time. For example: at the time a menu-link is created, the /blog path might be provided by a route in Views module, but later this path may be served by the Panels module. Flagging a link as requiring rediscovery ensures

MenuLinkContent::preSave

public MenuLinkContent::preSave(EntityStorageInterface $storage) Acts on an entity before the presave hook is invoked. Used before the entity is saved and before invoking the presave hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. This is different from its counterpart in the Field API, FieldItemListInterface::preSave(), which is fired on all field translation

MenuLinkContent::preDelete

public static MenuLinkContent::preDelete(EntityStorageInterface $storage, array $entities) Acts on entities before they are deleted and before hooks are invoked. Used before the entities are deleted and before invoking the delete hook. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. \Drupal\Core\Entity\EntityInterface[] $entities: An array of entities. Overrides Entity::preDelete File core/modules/menu_link_content/src/Entity/MenuLinkContent.php, line

MenuLinkContent::preCreate

public static MenuLinkContent::preCreate(EntityStorageInterface $storage, array &$values) Changes the values of an entity before it is created. Load defaults for example. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. mixed[] $values: An array of values to set, keyed by property name. If the entity type has bundles the bundle key has to be specified. Overrides Entity::preCreate File core/modules/menu_link_content/src/Entity/MenuLinkContent.php, l

MenuLinkContent::postSave

public MenuLinkContent::postSave(EntityStorageInterface $storage, $update = TRUE) Acts on a saved entity before the insert or update hook is invoked. Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.