protected function ContentPublishingSettingsTrait::getEntityViewModesSettingValue in Acquia Lift Connector 8.4
Returns the value of the entity view modes setting.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The current entity.
Return value
array The setting value.
2 calls to ContentPublishingSettingsTrait::getEntityViewModesSettingValue()
- EntityRenderHandler::onCreateCdf in modules/
acquia_lift_publisher/ src/ EventSubscriber/ Cdf/ EntityRenderHandler.php - Actions on create CDF.
- PublishOnlyRendered::onEnqueueCandidateEntity in modules/
acquia_lift_publisher/ src/ EventSubscriber/ Publish/ PublishOnlyRendered.php - Checks if the entity in hand is a renderable entity.
File
- modules/
acquia_lift_publisher/ src/ Form/ ContentPublishingSettingsTrait.php, line 31
Class
- ContentPublishingSettingsTrait
- Provides common methods for classes that involve publisher settings.
Namespace
Drupal\acquia_lift_publisher\FormCode
protected function getEntityViewModesSettingValue(EntityInterface $entity) : array {
return $this->publisherSettings
->get("view_modes.{$entity->getEntityTypeId()}.{$entity->bundle()}") ?? [];
}