function FieldTypeCategoryManager::alterDefinitions

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Field/FieldTypeCategoryManager.php \Drupal\Core\Field\FieldTypeCategoryManager::alterDefinitions()

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

Parameters

array $definitions: The discovered plugin definitions.

Overrides DefaultPluginManager::alterDefinitions

File

core/lib/Drupal/Core/Field/FieldTypeCategoryManager.php, line 85

Class

FieldTypeCategoryManager
Defines a field type category info plugin manager.

Namespace

Drupal\Core\Field

Code

protected function alterDefinitions(&$definitions) : void {
  parent::alterDefinitions($definitions);
  if (!isset($definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY])) {
    throw new \LogicException('Missing fallback category.');
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.