protected function EntityRenderHandler::getViewMode in Acquia Lift Connector 8.4
Returns the applicable render array.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The renderable entity.
string $view_mode: The view mode to render in.
Return value
array The render array.
2 calls to EntityRenderHandler::getViewMode()
- EntityRenderHandler::getBlockMinimalBuildArray in modules/
acquia_lift_publisher/ src/ EventSubscriber/ Cdf/ EntityRenderHandler.php - Renders block using BlockViewBuilder.
- EntityRenderHandler::getViewModeMinimalHtml in modules/
acquia_lift_publisher/ src/ EventSubscriber/ Cdf/ EntityRenderHandler.php - Get view mode minimal HTML.
File
- modules/
acquia_lift_publisher/ src/ EventSubscriber/ Cdf/ EntityRenderHandler.php, line 378
Class
- EntityRenderHandler
- Class EntityRenderHandler.
Namespace
Drupal\acquia_lift_publisher\EventSubscriber\CdfCode
protected function getViewMode(ContentEntityInterface $entity, string $view_mode) : array {
return $this->entityTypeManager
->getViewBuilder($entity
->getEntityTypeId())
->view($entity, $view_mode, $entity
->language()
->getId());
}