public function OrderType::calculateDependencies in Commerce Core 8.2
Calculates dependencies and stores them in the dependency property.
Return value
$this
Overrides ConfigEntityBase::calculateDependencies
See also
\Drupal\Core\Config\Entity\ConfigDependencyManager
File
- modules/
order/ src/ Entity/ OrderType.php, line 214
Class
- OrderType
- Defines the order type entity class.
Namespace
Drupal\commerce_order\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
// The order 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;
}