public static function MenuLinkContentVisibilityCache::createFromID in Custom Menu Links Visibility 8
File
- src/
MenuLinkContentVisibilityCache.php, line 18
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'));
}