Drupal 8  8.0.2
NodeViewBuilder Class Reference
Inheritance diagram for NodeViewBuilder:

Static Public Member Functions

static renderLinks ($node_entity_id, $view_mode, $langcode, $is_in_preview)
 
- Static Public Member Functions inherited from EntityViewBuilder
static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 

Protected Member Functions

 getBuildDefaults (EntityInterface $entity, $view_mode)
 
- Protected Member Functions inherited from EntityViewBuilder
 getBuildDefaults (EntityInterface $entity, $view_mode)
 
 alterBuild (array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode)
 
 isViewModeCacheable ($view_mode)
 
 getSingleFieldDisplay ($entity, $field_name, $display_options)
 
- Protected Member Functions inherited from EntityHandlerBase
 moduleHandler ()
 

Static Protected Member Functions

static buildLinks (NodeInterface $entity, $view_mode)
 

Additional Inherited Members

- Public Member Functions inherited from EntityViewBuilder
 __construct (EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager)
 
 view (EntityInterface $entity, $view_mode= 'full', $langcode=NULL)
 
 viewMultiple (array $entities=array(), $view_mode= 'full', $langcode=NULL)
 
 build (array $build)
 
 buildMultiple (array $build_list)
 
 buildComponents (array &$build, array $entities, array $displays, $view_mode)
 
 getCacheTags ()
 
 resetCache (array $entities=NULL)
 
 viewField (FieldItemListInterface $items, $display_options=array())
 
 viewFieldItem (FieldItemInterface $item, $display=array())
 
- Public Member Functions inherited from EntityHandlerBase
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
- Protected Attributes inherited from EntityViewBuilder
 $entityTypeId
 
 $entityType
 
 $entityManager
 
 $cacheBin = 'render'
 
 $languageManager
 
 $singleFieldDisplays
 
- Protected Attributes inherited from EntityHandlerBase
 $moduleHandler
 

Detailed Description

Render controller for nodes.

Member Function Documentation

static buildLinks ( NodeInterface  $entity,
  $view_mode 
)
staticprotected

Build the default links (Read more) for a node.

Parameters
\Drupal\node\NodeInterface$entityThe node object.
string$view_modeA view mode identifier.
Returns
array An array that can be processed by drupal_pre_render_links().

References EntityInterface\label(), TranslatableInterface\language(), t(), and EntityInterface\urlInfo().

Here is the call graph for this function:

getBuildDefaults ( EntityInterface  $entity,
  $view_mode 
)
protected

{}

static renderLinks (   $node_entity_id,
  $view_mode,
  $langcode,
  $is_in_preview 
)
static

#lazy_builder callback; builds a node's links.

Parameters
string$node_entity_idThe node entity ID.
string$view_modeThe view mode in which the node entity is being viewed.
string$langcodeThe language in which the node entity is being viewed.
bool$is_in_previewWhether the node is currently being previewed.
Returns
array A renderable array representing the node links.

References Entity\load(), and Drupal\moduleHandler().

Here is the call graph for this function:


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