trait ConfigDependencyDeleteFormTrait (View source)

Lists affected configuration entities by a dependency removal.

This trait relies on the StringTranslationTrait.

Methods

t($string, array $args = [], array $options = [])

Translates a string to the current language or to a given language.

addDependencyListsToForm(array $form, string $type, array $names, ConfigManagerInterface $config_manager, EntityTypeManagerInterface $entity_type_manager)

Adds form elements to list affected configuration entities.

Details

abstract protected t($string, array $args = [], array $options = [])

Translates a string to the current language or to a given language.

Provided by \Drupal\Core\StringTranslation\StringTranslationTrait.

Parameters

$string
array $args
array $options

protected addDependencyListsToForm(array $form, string $type, array $names, ConfigManagerInterface $config_manager, EntityTypeManagerInterface $entity_type_manager)

Adds form elements to list affected configuration entities.

Parameters

array $form

The form array to add elements to.

string $type

The type of dependency being checked. Either 'module', 'theme', 'config' or 'content'.

array $names

The specific names to check. If $type equals 'module' or 'theme' then it should be a list of module names or theme names. In the case of 'config' or 'content' it should be a list of configuration dependency names.

ConfigManagerInterface $config_manager

The config manager.

EntityTypeManagerInterface $entity_type_manager

The entity type manager.

See also

ConfigManagerInterface::getConfigEntitiesToChangeOnDependencyRemoval