function TopLevelBook::create

Same name in other branches
  1. 8.9.x core/modules/book/src/Plugin/views/argument_default/TopLevelBook.php \Drupal\book\Plugin\views\argument_default\TopLevelBook::create()
  2. 10 core/modules/book/src/Plugin/views/argument_default/TopLevelBook.php \Drupal\book\Plugin\views\argument_default\TopLevelBook::create()
  3. 11.x core/modules/book/src/Plugin/views/argument_default/TopLevelBook.php \Drupal\book\Plugin\views\argument_default\TopLevelBook::create()

Overrides Node::create

File

core/modules/book/src/Plugin/views/argument_default/TopLevelBook.php, line 49

Class

TopLevelBook
Default argument plugin to get the current node's top level book.

Namespace

Drupal\book\Plugin\views\argument_default

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container->get('current_route_match'), $container->get('entity_type.manager')
        ->getStorage('node'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.