You are here

public function LogType::calculateDependencies in Log entity 2.x

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/LogType.php, line 167

Class

LogType
Defines the Log type entity.

Namespace

Drupal\log\Entity

Code

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

  // The log type must depend on the module that provides the workflow.
  $workflow_manager = \Drupal::service('plugin.manager.workflow');
  $workflow = $workflow_manager
    ->createInstance($this
    ->getWorkflowId());
  $this
    ->calculatePluginDependencies($workflow);
  return $this;
}