public function JsonapiResourceConfig::calculateDependencies in JSON:API Extras 8.2
Same name and namespace in other branches
- 8.3 src/Entity/JsonapiResourceConfig.php \Drupal\jsonapi_extras\Entity\JsonapiResourceConfig::calculateDependencies()
- 8 src/Entity/JsonapiResourceConfig.php \Drupal\jsonapi_extras\Entity\JsonapiResourceConfig::calculateDependencies()
Calculates dependencies and stores them in the dependency property.
Return value
$this
Overrides ConfigEntityBase::calculateDependencies
See also
\Drupal\Core\Config\Entity\ConfigDependencyManager
File
- src/
Entity/ JsonapiResourceConfig.php, line 70
Class
- JsonapiResourceConfig
- Defines the JSON API Resource Config entity.
Namespace
Drupal\jsonapi_extras\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
$id = explode('--', $this->id);
$typeManager = $this
->entityTypeManager();
$dependency = $typeManager
->getDefinition($id[0])
->getBundleConfigDependency($id[1]);
$this
->addDependency($dependency['type'], $dependency['name']);
}