public static function MenuLinkContentVisibilityChecker::createFromID in Custom Menu Links Visibility 8
File
- src/
MenuLinkContentVisibilityChecker.php, line 17
Class
Namespace
Drupal\menu_link_content_visibilityCode
public static function createFromID(ContainerInterface $container, $id) {
$entity_manager = $container
->get('entity.manager');
$menu_link_content = $entity_manager
->getStorage('menu_link_content')
->load($id);
return new self($menu_link_content, $container
->get('plugin.manager.condition'), $container
->get('context.repository'), $container
->get('context.handler'));
}