NodeViewController::view

public NodeViewController::view(EntityInterface $node, $view_mode = 'full', $langcode = NULL) Provides a page to render a single entity. Parameters \Drupal\Core\Entity\EntityInterface $_entity: The Entity to be rendered. Note this variable is named $_entity rather than $entity to prevent collisions with other named placeholders in the route. string $view_mode: (optional) The view mode that should be used to display the entity. Defaults to 'full'. Return value array A render array as expected

NodeViewController::title

public NodeViewController::title(EntityInterface $node) The _title_callback for the page that renders a single node. Parameters \Drupal\Core\Entity\EntityInterface $node: The current node. Return value string The page title. File core/modules/node/src/Controller/NodeViewController.php, line 108 Class NodeViewController Defines a controller to render a single node. Namespace Drupal\node\Controller Code public function title(EntityInterface $node) { return $this->entityManager->

NodeViewController::create

public static NodeViewController::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. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The servi

NodeViewController::$currentUser

The current user. Type: \Drupal\Core\Session\AccountInterface File core/modules/node/src/Controller/NodeViewController.php, line 22 Class NodeViewController Defines a controller to render a single node. Namespace Drupal\node\Controller Code protected $currentUser;

NodeViewController

Defines a controller to render a single node. Hierarchy class \Drupal\Core\Entity\Controller\EntityViewController implements ContainerInjectionInterfaceclass \Drupal\node\Controller\NodeViewController File core/modules/node/src/Controller/NodeViewController.php, line 15 Namespace Drupal\node\Controller Members Name Modifiers Type Description EntityViewController::$entityManager protected property The entity manager EntityViewController::$renderer protected propert

NodeViewBuilder::renderLinks

public static NodeViewBuilder::renderLinks($node_entity_id, $view_mode, $langcode, $is_in_preview) #lazy_builder callback; builds a node's links. Parameters string $node_entity_id: The node entity ID. string $view_mode: The view mode in which the node entity is being viewed. string $langcode: The language in which the node entity is being viewed. bool $is_in_preview: Whether the node is currently being previewed. Return value array A renderable array representing the node links. File core/mod

NodeViewBuilder::getBuildDefaults

protected NodeViewBuilder::getBuildDefaults(EntityInterface $entity, $view_mode) Provides entity-specific defaults to the build process. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for which the defaults should be provided. string $view_mode: The view mode that should be used. Return value array Overrides EntityViewBuilder::getBuildDefaults File core/modules/node/src/NodeViewBuilder.php, line 57 Class NodeViewBuilder View builder handler for nodes. Namespace Dru

NodeViewBuilder::buildLinks

protected static NodeViewBuilder::buildLinks(NodeInterface $entity, $view_mode) Build the default links (Read more) for a node. Parameters \Drupal\node\NodeInterface $entity: The node object. string $view_mode: A view mode identifier. Return value array An array that can be processed by drupal_pre_render_links(). File core/modules/node/src/NodeViewBuilder.php, line 115 Class NodeViewBuilder View builder handler for nodes. Namespace Drupal\node Code protected static function buildLink

NodeViewBuilder::buildComponents

public NodeViewBuilder::buildComponents(array &$build, array $entities, array $displays, $view_mode) Builds the component fields and properties of a set of entities. Parameters &$build: The renderable array representing the entity content. \Drupal\Core\Entity\EntityInterface[] $entities: The entities whose content is being built. \Drupal\Core\Entity\Display\EntityViewDisplayInterface[] $displays: The array of entity view displays holding the display options configured for the entity co

NodeViewBuilder::alterBuild

protected NodeViewBuilder::alterBuild(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) Specific per-entity building. Parameters array $build: The render array that is being created. \Drupal\Core\Entity\EntityInterface $entity: The entity to be prepared. \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display holding the display options configured for the entity components. string $view_mode: The view mode that should