ConfigDependencies
class ConfigDependencies implements ContainerInjectionInterface (View source)
| internal |
Calculates rest resource config dependencies.
Properties
| protected string[] | $formatProviders | The serialization format providers, keyed by format. |
|
| protected string[] | $authProviders | The authentication providers, keyed by ID. |
Methods
Creates a new ConfigDependencies instance.
Instantiates a new instance of this class.
Calculates dependencies of a specific rest resource configuration.
Informs the entity that entities it depends on will be deleted.
Informs the entity that entities it depends on will be deleted.
Informs the entity that entities it depends on will be deleted.
Details
__construct(array $format_providers, array $auth_providers)
Creates a new ConfigDependencies instance.
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
string[][]
calculateDependencies(RestResourceConfigInterface $rest_config)
Calculates dependencies of a specific rest resource configuration.
This function returns dependencies in a non-sorted, non-unique manner. It is therefore the caller's responsibility to sort and remove duplicates from the result prior to saving it with the configuration or otherwise using it in a way that requires that. For example, \Drupal\rest\Entity\RestResourceConfig::calculateDependencies() does this via its \Drupal\Core\Entity\DependencyTrait::addDependency() method.
bool
onDependencyRemoval(RestResourceConfigInterface $rest_config, array $dependencies)
Informs the entity that entities it depends on will be deleted.
protected bool
onDependencyRemovalForMethodGranularity(RestResourceConfigInterface $rest_config, array $dependencies)
Informs the entity that entities it depends on will be deleted.
protected bool
onDependencyRemovalForResourceGranularity(RestResourceConfigInterface $rest_config, array $dependencies)
Informs the entity that entities it depends on will be deleted.