You are here

class LayoutService 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
  2. 8.8 modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService
  3. 10.3.x modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService
  4. 10.1.x modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService
  5. 10.2.x modules/social_features/social_core/src/Service/LayoutService.php \Drupal\social_core\Service\LayoutService

Class LayoutService.

@package Drupal\social_core\Service

Hierarchy

Expanded class hierarchy of LayoutService

1 file declares its use of LayoutService
SocialCoreServiceProvider.php in modules/social_features/social_core/src/SocialCoreServiceProvider.php

File

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

Namespace

Drupal\social_core\Service
View source
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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LayoutEntityHelperTrait::$sectionStorageManager protected property The section storage manager. 1
LayoutEntityHelperTrait::getEntitySections protected function Gets the sections for an entity if any.
LayoutEntityHelperTrait::getInlineBlockComponents protected function Gets components that have Inline Block plugins.
LayoutEntityHelperTrait::getInlineBlockRevisionIdsInSections protected function Gets revision IDs for layout sections.
LayoutEntityHelperTrait::getSectionStorageForEntity protected function Gets the section storage for an entity.
LayoutEntityHelperTrait::isLayoutCompatibleEntity protected function Determines if an entity can have a layout.
LayoutEntityHelperTrait::originalEntityUsesDefaultStorage protected function Determines if the original entity used the default section storage.
LayoutEntityHelperTrait::sectionStorageManager private function Gets the section storage manager. 1
LayoutService::isTrueLayoutCompatibleEntity public function Determines if an entity can have a layout.