You are here

protected function LingotekContentModerationSettingsForm::getWorkflow in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8.2 src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  2. 4.0.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  3. 3.0.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  4. 3.1.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  5. 3.3.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  6. 3.4.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  7. 3.5.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  8. 3.6.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  9. 3.7.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()
  10. 3.8.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::getWorkflow()

Gets the workflow for the given entity type id and bundle.

Parameters

string $entity_type_id: The entity type id.

string $bundle: The bundle id.

Return value

\Drupal\workflows\WorkflowInterface|null

4 calls to LingotekContentModerationSettingsForm::getWorkflow()
LingotekContentModerationSettingsForm::getDefaultModerationDownloadTransition in src/Moderation/LingotekContentModerationSettingsForm.php
Gets the default transition.
LingotekContentModerationSettingsForm::getDefaultModerationUploadStatus in src/Moderation/LingotekContentModerationSettingsForm.php
Gets the default upload status.
LingotekContentModerationSettingsForm::getModerationDownloadTransitions in src/Moderation/LingotekContentModerationSettingsForm.php
Gets the default download transition.
LingotekContentModerationSettingsForm::getModerationUploadStatuses in src/Moderation/LingotekContentModerationSettingsForm.php
Gets the moderation statuses.

File

src/Moderation/LingotekContentModerationSettingsForm.php, line 115

Class

LingotekContentModerationSettingsForm
Moderation settings form for the Lingotek content_moderation integration.

Namespace

Drupal\lingotek\Moderation

Code

protected function getWorkflow($entity_type_id, $bundle) {
  $bundles = $this->entityTypeBundleInfo
    ->getBundleInfo($entity_type_id);
  $workflow = NULL;
  if (isset($bundles[$bundle]['workflow'])) {
    $workflow = $this->entityTypeManager
      ->getStorage('workflow')
      ->load($bundles[$bundle]['workflow']);
  }
  return $workflow;
}