You are here

public function ParagraphsType::calculateDependencies in Paragraphs 8

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/ParagraphsType.php, line 201

Class

ParagraphsType
Defines the ParagraphsType entity.

Namespace

Drupal\paragraphs\Entity

Code

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

  // Add the file icon entity as dependency if a UUID was specified.
  if ($this->icon_uuid && ($file_icon = $this
    ->getIconFile())) {
    $this
      ->addDependency($file_icon
      ->getConfigDependencyKey(), $file_icon
      ->getConfigDependencyName());
  }
  return $this;
}