function BookNavigationBlock::create

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

Overrides ContainerFactoryPluginInterface::create

File

core/modules/book/src/Plugin/Block/BookNavigationBlock.php, line 74

Class

BookNavigationBlock
Provides a 'Book navigation' block.

Namespace

Drupal\book\Plugin\Block

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('book.manager'), $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.