You are here

public function OverridesSectionStorage::isOverridden in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::isOverridden()

Indicates if overrides are in use.

Return value

bool TRUE if this overrides section storage is in use, otherwise FALSE.

Overrides OverridesSectionStorageInterface::isOverridden

1 call to OverridesSectionStorage::isOverridden()
OverridesSectionStorage::isApplicable in core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php
Determines if this section storage is applicable for the current contexts.

File

core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php, line 399

Class

OverridesSectionStorage
Defines the 'overrides' section storage type.

Namespace

Drupal\layout_builder\Plugin\SectionStorage

Code

public function isOverridden() {

  // If there are any sections at all, including a blank one, this section
  // storage has been overridden. Do not use count() as it does not include
  // blank sections.
  return !empty($this
    ->getSections());
}