protected function KeyConfigOverrideAddForm::getConfigEntityTypeDefinitions in Key 8
Get the configuration entity type definitions.
Parameters
bool $with_excluded: Whether or not to include excluded configuration types.
Return value
\Drupal\Core\Entity\EntityTypeInterface[] The entity type definitions.
3 calls to KeyConfigOverrideAddForm::getConfigEntityTypeDefinitions()
- KeyConfigOverrideAddForm::buildForm in src/
Form/ KeyConfigOverrideAddForm.php - Form constructor.
- KeyConfigOverrideAddForm::getConfigNames in src/
Form/ KeyConfigOverrideAddForm.php - Get the configuration names for a specified configuration type.
- KeyConfigOverrideAddForm::validateForm in src/
Form/ KeyConfigOverrideAddForm.php - Form validation handler.
File
- src/
Form/ KeyConfigOverrideAddForm.php, line 259
Class
- KeyConfigOverrideAddForm
- KeyConfigOverrideAddForm class.
Namespace
Drupal\key\FormCode
protected function getConfigEntityTypeDefinitions($with_excluded = FALSE) {
if (!isset($this->configEntityTypeDefinitions)) {
$config_entity_type_definitions = [];
foreach ($this->entityTypeManager
->getDefinitions() as $entity_type => $definition) {
if ($definition
->entityClassImplements(ConfigEntityInterface::class)) {
$config_entity_type_definitions[$entity_type] = $definition;
}
}
$this->configEntityTypeDefinitions = $config_entity_type_definitions;
}
if ($with_excluded) {
$definitions = $this->configEntityTypeDefinitions;
}
else {
$definitions = array_diff_key($this->configEntityTypeDefinitions, $this
->excludedConfigTypes());
}
return $definitions;
}