You are here

public function SectionStorageInterface::isApplicable in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/SectionStorageInterface.php \Drupal\layout_builder\SectionStorageInterface::isApplicable()
  2. 9 core/modules/layout_builder/src/SectionStorageInterface.php \Drupal\layout_builder\SectionStorageInterface::isApplicable()

Determines if this section storage is applicable for the current contexts.

@internal This method is intended to be called by \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext().

Parameters

\Drupal\Core\Cache\RefinableCacheableDependencyInterface $cacheability: Refinable cacheability object, typically provided by the section storage manager. When implementing this method, populate $cacheability with any information that affects whether this storage is applicable.

Return value

bool TRUE if this section storage is applicable, FALSE otherwise.

See also

\Drupal\Core\Cache\RefinableCacheableDependencyInterface

2 methods override SectionStorageInterface::isApplicable()
SimpleConfigSectionStorage::isApplicable in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
Determines if this section storage is applicable for the current contexts.
TestStateBasedSectionStorage::isApplicable in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php
Determines if this section storage is applicable for the current contexts.

File

core/modules/layout_builder/src/SectionStorageInterface.php, line 136

Class

SectionStorageInterface
Defines an interface for Section Storage type plugins.

Namespace

Drupal\layout_builder

Code

public function isApplicable(RefinableCacheableDependencyInterface $cacheability);