You are here

public function MenuLinkResetForm::linkIsResettable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_ui/src/Form/MenuLinkResetForm.php \Drupal\menu_ui\Form\MenuLinkResetForm::linkIsResettable()

Checks access based on whether the link can be reset.

Parameters

\Drupal\Core\Menu\MenuLinkInterface $menu_link_plugin: The menu link plugin being checked.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 string reference to 'MenuLinkResetForm::linkIsResettable'
menu_ui.routing.yml in core/modules/menu_ui/menu_ui.routing.yml
core/modules/menu_ui/menu_ui.routing.yml

File

core/modules/menu_ui/src/Form/MenuLinkResetForm.php, line 121
Contains \Drupal\menu_ui\Form\MenuLinkResetForm.

Class

MenuLinkResetForm
Defines a confirmation form for resetting a single modified menu link.

Namespace

Drupal\menu_ui\Form

Code

public function linkIsResettable(MenuLinkInterface $menu_link_plugin) {
  return AccessResult::allowedIf($menu_link_plugin
    ->isResettable())
    ->setCacheMaxAge(0);
}