|
|
@ -53,9 +53,9 @@ class FieldViewBuilder { |
|
|
|
|
|
|
|
|
|
|
|
$build = []; |
|
|
|
$build = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$entity = $this->entityRepository->getTranslationFromContext($entity, $langcode); |
|
|
|
$access = $check_access ? $entity->access('view', NULL, TRUE) : AccessResult::allowed(); |
|
|
|
$access = $check_access ? $entity->access('view', NULL, TRUE) : AccessResult::allowed(); |
|
|
|
if ($access->isAllowed()) { |
|
|
|
if ($access->isAllowed()) { |
|
|
|
$entity = $this->entityRepository->getTranslationFromContext($entity, $langcode); |
|
|
|
|
|
|
|
if (!isset($entity->{$field_name})) { |
|
|
|
if (!isset($entity->{$field_name})) { |
|
|
|
// @todo Trigger error here. |
|
|
|
// @todo Trigger error here. |
|
|
|
return []; |
|
|
|
return []; |
|
|
|