function FieldConfigListBuilder::load
Same name in other branches
- 9 core/modules/field_ui/src/FieldConfigListBuilder.php \Drupal\field_ui\FieldConfigListBuilder::load()
- 8.9.x core/modules/field_ui/src/FieldConfigListBuilder.php \Drupal\field_ui\FieldConfigListBuilder::load()
- 11.x core/modules/field_ui/src/FieldConfigListBuilder.php \Drupal\field_ui\FieldConfigListBuilder::load()
Overrides ConfigEntityListBuilder::load
File
-
core/
modules/ field_ui/ src/ FieldConfigListBuilder.php, line 106
Class
- FieldConfigListBuilder
- Provides lists of field config entities.
Namespace
Drupal\field_uiCode
public function load() {
$entities = array_filter($this->entityFieldManager
->getFieldDefinitions($this->targetEntityTypeId, $this->targetBundle), function ($field_definition) {
return $field_definition instanceof FieldConfigInterface;
});
// Sort the entities using the entity class's sort() method.
// See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
uasort($entities, [
$this->entityType
->getClass(),
'sort',
]);
return $entities;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.