You are here

public function LayoutService::isTrueLayoutCompatibleEntity in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService::isTrueLayoutCompatibleEntity()
  2. 8.8 modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService::isTrueLayoutCompatibleEntity()
  3. 10.3.x modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService::isTrueLayoutCompatibleEntity()
  4. 10.1.x modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService::isTrueLayoutCompatibleEntity()
  5. 10.2.x modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService::isTrueLayoutCompatibleEntity()

Determines if an entity can have a layout.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to check.

Return value

bool TRUE if the entity can have a layout otherwise FALSE.

File

modules/social_features/social_core/src/Service/LayoutService.php, line 26

Class

LayoutService
Class LayoutService.

Namespace

Drupal\social_core\Service

Code

public function isTrueLayoutCompatibleEntity(EntityInterface $entity) {
  if (!\Drupal::moduleHandler()
    ->moduleExists('layout_builder')) {
    return FALSE;
  }
  return $this
    ->isLayoutCompatibleEntity($entity);
}