You are here

protected function ElementManager::alterDefinitions in Layout Builder Symmetric Translations 8

Invokes the hook to alter the definitions if the alter hook is set.

Parameters

$definitions: The discovered plugin definitions.

Overrides DefaultPluginManager::alterDefinitions

File

src/ElementManager.php, line 18

Class

ElementManager
ElementManager extended to alter LayoutBuilder Element.

Namespace

Drupal\layout_builder_st

Code

protected function alterDefinitions(&$definitions) {
  parent::alterDefinitions($definitions);

  // Replace LayoutBuilder element class.
  if (isset($definitions['layout_builder'])) {
    $definitions['layout_builder']['class'] = LayoutBuilder::class;
    $definitions['layout_builder']['provider'] = 'layout_builder_st';
  }
}