Drupal 8  8.0.2
BookController Class Reference
Inheritance diagram for BookController:

Public Member Functions

 __construct (BookManagerInterface $bookManager, BookExport $bookExport, RendererInterface $renderer)
 bookRender ()
 bookExport ($type, NodeInterface $node)

Static Public Member Functions

static create (ContainerInterface $container)

Protected Attributes


Detailed Description

Controller routines for book routes.

Constructor & Destructor Documentation

__construct ( BookManagerInterface  $bookManager,
BookExport  $bookExport,
RendererInterface  $renderer 

Constructs a BookController object.

\Drupal\book\BookManagerInterface$bookManagerThe book manager.
\Drupal\book\BookExport$bookExportThe book export service.
\Drupal\Core\Render\RendererInterface$rendererThe renderer.

References BookController\bookExport().

Here is the call graph for this function:

Member Function Documentation

bookExport (   $type,
NodeInterface  $node 

Generates representations of a book page and its children.

The method delegates the generation of output to helper methods. The method name is derived by prepending 'bookExport' to the camelized form of given output type. For example, a type of 'html' results in a call to the method bookExportHtml().

string$typeA string encoding the type of output requested. The following types are currently supported in book module:
  • html: Printer-friendly HTML. Other types may be supported in contributed modules.
\Drupal\node\NodeInterface$nodeThe node to export.
array A render array representing the node and its children in the book hierarchy in a format determined by the $type parameter.

References t().

Referenced by BookController\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

bookRender ( )

Prints a listing of all books.

array A render array representing the listing of all books content.

References Drupal\entityManager(), and Drupal\l().

Here is the call graph for this function:

static create ( ContainerInterface  $container)


The documentation for this class was generated from the following file: