LayoutService.php in Open Social 10.0.x
Same filename and directory in other branches
- 8.9 modules/social_features/social_core/src/Service/LayoutService.php
- 8.8 modules/social_features/social_core/src/Service/LayoutService.php
- 10.3.x modules/social_features/social_core/src/Service/LayoutService.php
- 10.1.x modules/social_features/social_core/src/Service/LayoutService.php
- 10.2.x modules/social_features/social_core/src/Service/LayoutService.php
Namespace
Drupal\social_core\ServiceFile
modules/social_features/social_core/src/Service/LayoutService.phpView source
<?php
namespace Drupal\social_core\Service;
use Drupal\Core\Entity\EntityInterface;
use Drupal\layout_builder\LayoutEntityHelperTrait;
/**
* Class LayoutService.
*
* @package Drupal\social_core\Service
*/
class LayoutService {
use LayoutEntityHelperTrait;
/**
* Determines if an entity can have a layout.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to check.
*
* @return bool
* TRUE if the entity can have a layout otherwise FALSE.
*/
public function isTrueLayoutCompatibleEntity(EntityInterface $entity) {
if (!\Drupal::moduleHandler()
->moduleExists('layout_builder')) {
return FALSE;
}
return $this
->isLayoutCompatibleEntity($entity);
}
}
Classes
Name | Description |
---|---|
LayoutService | Class LayoutService. |