function FieldTypePluginManager::getUiDefinitions
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getUiDefinitions()
- 8.9.x core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getUiDefinitions()
- 11.x core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getUiDefinitions()
1 call to FieldTypePluginManager::getUiDefinitions()
- FieldTypePluginManager::getEntityTypeUiDefinitions in core/
lib/ Drupal/ Core/ Field/ FieldTypePluginManager.php
File
-
core/
lib/ Drupal/ Core/ Field/ FieldTypePluginManager.php, line 215
Class
- FieldTypePluginManager
- Plugin manager for 'field type' plugins.
Namespace
Drupal\Core\FieldCode
public function getUiDefinitions() {
$definitions = $this->getDefinitions();
// Filter out definitions that can not be configured in Field UI.
$definitions = array_filter($definitions, function ($definition) {
return empty($definition['no_ui']);
});
// Add preconfigured definitions.
foreach ($definitions as $id => $definition) {
if (is_subclass_of($definition['class'], '\\Drupal\\Core\\Field\\PreconfiguredFieldUiOptionsInterface')) {
foreach ($this->getPreconfiguredOptions($definition['id']) as $key => $option) {
$definitions["field_ui:{$id}:{$key}"] = array_intersect_key($option, [
'label' => 0,
'category' => 1,
'weight' => 1,
'description' => 0,
]) + $definition;
}
}
}
return $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.