You are here

protected function LayoutBuilderContextTrait::getAvailableContexts in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Context/LayoutBuilderContextTrait.php \Drupal\layout_builder\Context\LayoutBuilderContextTrait::getAvailableContexts()

Provides all available contexts, both global and section_storage-specific.

Parameters

\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.

Return value

\Drupal\Core\Plugin\Context\ContextInterface[] The array of context objects.

Deprecated

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\layout_builder\Context\LayoutBuilderContextTrait::getPopulatedContexts() instead.

See also

https://www.drupal.org/node/3195121

File

core/modules/layout_builder/src/Context/LayoutBuilderContextTrait.php, line 48

Class

LayoutBuilderContextTrait
Provides a wrapper around getting contexts from a section storage object.

Namespace

Drupal\layout_builder\Context

Code

protected function getAvailableContexts(SectionStorageInterface $section_storage) {
  @trigger_error('\\Drupal\\layout_builder\\Context\\LayoutBuilderContextTrait::getAvailableContexts() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\layout_builder\\Context\\LayoutBuilderContextTrait::getPopulatedContexts() instead. See https://www.drupal.org/node/3195121', E_USER_DEPRECATED);
  return self::getPopulatedContexts($section_storage);
}