1 entity.controller.inc public EntityControllerInterface::buildContent(EntityInterface $entity, $view_mode = 'full', $langcode = NULL)

Builds a structured array representing the entity's content.

The content built for the entity will vary depending on the $view_mode parameter.

Parameters

EntityInterface $entity: An entity object.

string $view_mode: View mode, e.g. 'full', 'teaser'...

string|NULL $langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request.

Return value

The renderable array.:

File

core/modules/entity/entity.controller.inc, line 71
Entity API controller classes and interface.

Class

EntityControllerInterface
Defines a common interface for entity controller classes.

Code

public function buildContent(EntityInterface $entity, $view_mode = 'full', $langcode = NULL);