public ConfigDependencies::onDependencyRemoval(RestResourceConfigInterface $rest_config, array $dependencies)
Informs the entity that entities it depends on will be deleted.
Parameters
\Drupal\rest\RestResourceConfigInterface $rest_config: The rest configuration.
array $dependencies: An array of dependencies that will be deleted keyed by dependency type. Dependency types are, for example, entity, module and theme.
Return value
bool TRUE if the entity has been changed as a result, FALSE if not.
See also
\Drupal\Core\Config\Entity\ConfigEntityInterface::onDependencyRemoval()
File
- core/modules/rest/src/Entity/ConfigDependencies.php, line 125
Class
- ConfigDependencies
- Calculates rest resource config dependencies.
Namespace
Drupal\rest\Entity
Code
public function onDependencyRemoval(RestResourceConfigInterface $rest_config, array $dependencies) { $granularity = $rest_config->get('granularity'); switch ($granularity) { case RestResourceConfigInterface::METHOD_GRANULARITY: return $this->onDependencyRemovalForMethodGranularity($rest_config, $dependencies); case RestResourceConfigInterface::RESOURCE_GRANULARITY: return $this->onDependencyRemovalForResourceGranularity($rest_config, $dependencies); default: throw new \InvalidArgumentException('Invalid granularity specified.'); } }
Please login to continue.