NodeViewController
class NodeViewController extends EntityViewController (View source)
Defines a controller to render a single node.
Traits
Provides a standard way to announce deprecated properties.
Properties
| protected | $deprecatedProperties | {@inheritdoc} | from EntityViewController |
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
from EntityViewController |
| protected RendererInterface | $renderer | The renderer service. |
from EntityViewController |
| protected AccountInterface | $currentUser | The current user. |
|
| protected EntityRepositoryInterface | $entityRepository | The entity repository service. |
Methods
Creates an 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.
Details
__get($name)
Allows to access deprecated/removed properties.
This method must be public.
__construct(EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, AccountInterface $current_user = NULL, EntityRepositoryInterface $entity_repository = NULL)
Creates an 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, string $view_mode = '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)
The _title_callback for the page that renders a single node.