You are here

public function LingotekContentModerationSettingsForm::getModerationDownloadTransitions in Lingotek Translation 3.3.x

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

Gets the default download transition.

Parameters

string $entity_type_id: The entity type id.

string $bundle: The bundle id.

Return value

string The default transition ID. If there is a setting, that will be returned.

Overrides LingotekModerationSettingsFormInterface::getModerationDownloadTransitions

1 call to LingotekContentModerationSettingsForm::getModerationDownloadTransitions()
LingotekContentModerationSettingsForm::form in src/Moderation/LingotekContentModerationSettingsForm.php
Gets the subform for configuring the settings for a given bundle.

File

src/Moderation/LingotekContentModerationSettingsForm.php, line 214

Class

LingotekContentModerationSettingsForm
Moderation settings form for the Lingotek content_moderation integration.

Namespace

Drupal\lingotek\Moderation

Code

public function getModerationDownloadTransitions($entity_type_id, $bundle) {
  $workflow = $this
    ->getWorkflow($entity_type_id, $bundle);
  $transitions = $workflow
    ->getTypePlugin()
    ->getTransitions();
  $values = [];
  foreach ($transitions as $transition_id => $transition) {
    $values[$transition_id] = $transition
      ->label();
  }
  return $values;
}