You are here

public function GroupContentType::calculateDependencies in Group 2.0.x

Same name and namespace in other branches
  1. 8 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 245

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 group relation plugin.
  $this
    ->addDependencies($this
    ->getRelationPlugin()
    ->calculateDependencies());
}