You are here

public function LingotekContentModerationSettingsForm::getModerationUploadStatuses in Lingotek Translation 3.7.x

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

Gets the moderation statuses.

Parameters

string $entity_type_id: The entity type id.

string $bundle: The bundle id.

Return value

array Array with statuses ids as keys and label as value.

Overrides LingotekModerationSettingsFormInterface::getModerationUploadStatuses

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

File

src/Moderation/LingotekContentModerationSettingsForm.php, line 127

Class

LingotekContentModerationSettingsForm
Moderation settings form for the Lingotek content_moderation integration.

Namespace

Drupal\lingotek\Moderation

Code

public function getModerationUploadStatuses($entity_type_id, $bundle) {
  $workflow = $this
    ->getWorkflow($entity_type_id, $bundle);
  $values = [];
  if ($workflow) {
    $states = $workflow
      ->getTypePlugin()
      ->getStates();
    foreach ($states as $state_id => $state) {
      $values[$state_id] = $state
        ->label();
    }
  }
  return $values;
}