You are here

protected function EntityRenderHandler::getAttributeValue in Acquia Lift Connector 8.4

Get attribute value.

Parameters

array $attribute: The attribute.

string $key: The key.

string|null $default: The default.

Return value

mixed|null The und value or the default value.

1 call to EntityRenderHandler::getAttributeValue()
EntityRenderHandler::storageWarmUp in modules/acquia_lift_publisher/src/EventSubscriber/Cdf/EntityRenderHandler.php
Storage warm up action.

File

modules/acquia_lift_publisher/src/EventSubscriber/Cdf/EntityRenderHandler.php, line 460

Class

EntityRenderHandler
Class EntityRenderHandler.

Namespace

Drupal\acquia_lift_publisher\EventSubscriber\Cdf

Code

protected function getAttributeValue(array $attribute, string $key, ?string $default = NULL) {
  return $attribute[$key][LanguageInterface::LANGCODE_NOT_SPECIFIED] ?? $default;
}