You are here

public function GroupContentType::calculateDependencies in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/GroupContentType.php \Drupal\group\Entity\GroupContentType::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/GroupContentType.php, line 241

Class

GroupContentType
Defines the Group content type configuration entity.

Namespace

Drupal\group\Entity

Code

public function calculateDependencies() {

  // By adding the group type as a dependency, we ensure the group content
  // type is deleted along with the group type.
  $this
    ->addDependency('config', $this
    ->getGroupType()
    ->getConfigDependencyName());

  // Add the dependencies of the responsible content enabler plugin.
  $this
    ->addDependencies($this
    ->getContentPlugin()
    ->calculateDependencies());
}