protected function EntityRenderHandler::getRenderUuid in Acquia Lift Connector 8.4
Get rendered content UUID for given source entity view mode and language.
A render UUID will be created if one does not already exist in Content Hub for the provided view mode and language.
Parameters
\Acquia\ContentHubClient\CDF\CDFObject $source_entity_cdf: The source entity CDF.
string $view_mode: The view mode identifier.
string $langcode: The language code.
Return value
mixed The UUID.
1 call to EntityRenderHandler::getRenderUuid()
- EntityRenderHandler::onCreateCdf in modules/
acquia_lift_publisher/ src/ EventSubscriber/ Cdf/ EntityRenderHandler.php - Actions on create CDF.
File
- modules/
acquia_lift_publisher/ src/ EventSubscriber/ Cdf/ EntityRenderHandler.php, line 400
Class
- EntityRenderHandler
- Class EntityRenderHandler.
Namespace
Drupal\acquia_lift_publisher\EventSubscriber\CdfCode
protected function getRenderUuid(CDFObject $source_entity_cdf, $view_mode, $langcode) {
$source_entity_uuid = $source_entity_cdf
->getUuid();
if ($this
->isStorageHit($source_entity_uuid, $langcode, $view_mode)) {
return $this
->getStorageItem($source_entity_uuid, $langcode, $view_mode);
}
// Warm up storage.
$this
->getAllRenderUuids($source_entity_uuid);
if (!$this
->isStorageHit($source_entity_uuid, $langcode, $view_mode)) {
$this
->setStorageItem($source_entity_uuid, $langcode, $view_mode, $this->uuidGenerator
->generate());
}
return $this
->getStorageItem($source_entity_uuid, $langcode, $view_mode);
}