You are here

public function FieldConfig::calculateDependencies in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::calculateDependencies()

Calculates dependencies and stores them in the dependency property.

Return value

$this

Overrides FieldConfigBase::calculateDependencies

See also

\Drupal\Core\Config\Entity\ConfigDependencyManager

File

core/modules/field/src/Entity/FieldConfig.php, line 188

Class

FieldConfig
Defines the Field entity.

Namespace

Drupal\field\Entity

Code

public function calculateDependencies() {
  parent::calculateDependencies();

  // Mark the field_storage_config as a dependency.
  $this
    ->addDependency('config', $this
    ->getFieldStorageDefinition()
    ->getConfigDependencyName());
  return $this;
}