NodePreviewController
class NodePreviewController extends EntityViewController (View source)
Defines a controller to render a single node in preview.
Properties
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
from EntityViewController |
| protected RendererInterface | $renderer | The renderer service. |
from EntityViewController |
| protected EntityRepositoryInterface | $entityRepository | The entity repository service. |
Methods
Creates a NodeViewController object.
Instantiates a new instance of this class.
Pre-render callback to build the page title.
Provides a page to render a single entity.
Lists the trusted callbacks provided by the implementing class.
Provides a page to render a single entity revision.
The _title_callback for the page that renders a single node in preview.
Details
__construct(EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, EntityRepositoryInterface $entity_repository)
Creates a NodeViewController object.
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
array
buildTitle(array $page)
Pre-render callback to build the page title.
array
view(EntityInterface $node_preview, $view_mode_id = 'full', $langcode = NULL)
Provides a page to render a single entity.
static string[]
trustedCallbacks()
Lists the trusted callbacks provided by the implementing class.
Trusted callbacks are public methods on the implementing class and can be invoked via \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback().
array
viewRevision(EntityInterface $_entity_revision, string $view_mode = 'full')
Provides a page to render a single entity revision.
string
title(EntityInterface $node_preview)
The _title_callback for the page that renders a single node in preview.