MenuLinkResetForm::linkIsResettable

public MenuLinkResetForm::linkIsResettable(MenuLinkInterface $menu_link_plugin)

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.

File

core/modules/menu_ui/src/Form/MenuLinkResetForm.php, line 116

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);
}
doc_Drupal
2016-10-29 09:27:15
Comments
Leave a Comment

Please login to continue.