public function FieldTypePluginManager::processDefinition in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::processDefinition()
Performs extra processing on plugin definitions.
By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.
Overrides DefaultPluginManager::processDefinition
File
- core/
lib/ Drupal/ Core/ Field/ FieldTypePluginManager.php, line 88
Class
- FieldTypePluginManager
- Plugin manager for 'field type' plugins.
Namespace
Drupal\Core\FieldCode
public function processDefinition(&$definition, $plugin_id) {
parent::processDefinition($definition, $plugin_id);
if (!isset($definition['list_class'])) {
$definition['list_class'] = '\\Drupal\\Core\\Field\\FieldItemList';
}
// Ensure that every field type has a category.
if (empty($definition['category'])) {
$definition['category'] = $this
->t('General');
}
}