class ConfigEntityDependency (View source)

Provides a value object to discover configuration dependencies.

Properties

protected string $name

The configuration entity's configuration object name.

protected array $dependencies

The configuration entity's dependencies.

Methods

__construct(string $name, array $values = [])

Constructs the configuration entity dependency from the entity values.

array
getDependencies(string $type)

Gets the configuration entity's dependencies of the supplied type.

bool
hasDependency(string $type, string $name)

Determines if the entity is dependent on extensions or entities.

string
getConfigDependencyName()

Gets the configuration entity's configuration dependency name.

Details

__construct(string $name, array $values = [])

Constructs the configuration entity dependency from the entity values.

Parameters

string $name

The configuration entity's configuration object name.

array $values

(optional) The configuration entity's values.

array getDependencies(string $type)

Gets the configuration entity's dependencies of the supplied type.

Parameters

string $type

The type of dependency to return. Either 'module', 'theme', 'config' or 'content'.

Return Value

array

The list of dependencies of the supplied type.

bool hasDependency(string $type, string $name)

Determines if the entity is dependent on extensions or entities.

Parameters

string $type

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

string $name

The specific name to check. If $type equals 'module' or 'theme' then it should be a module name or theme name. In the case of entity it should be the full configuration object name.

Return Value

bool

string getConfigDependencyName()

Gets the configuration entity's configuration dependency name.

Return Value

string

The configuration dependency name for the entity.

See also

EntityInterface::getConfigDependencyName