You are here

protected function EntityRenderHandler::storageWarmUp in Acquia Lift Connector 8.4

Storage warm up action.

Parameters

array $data: The array of data.

string $source_uuid: The source UUID.

1 call to EntityRenderHandler::storageWarmUp()
EntityRenderHandler::getAllRenderUuids in modules/acquia_lift_publisher/src/EventSubscriber/Cdf/EntityRenderHandler.php
Get all rendered content UUIDs for a given source entity.

File

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

Class

EntityRenderHandler
Class EntityRenderHandler.

Namespace

Drupal\acquia_lift_publisher\EventSubscriber\Cdf

Code

protected function storageWarmUp(array $data, $source_uuid) {
  foreach ($data as $entity_info) {

    // Ensure we discard any result that does not match exactly the source_uuid.
    if ($this
      ->getAttributeValue($entity_info['attributes'], 'source_entity') === $source_uuid) {
      $this
        ->setStorageItem($source_uuid, $this
        ->getAttributeValue($entity_info['attributes'], 'language'), $this
        ->getAttributeValue($entity_info['attributes'], 'view_mode'), $entity_info['uuid']);
    }
  }
}