You are here

public function LingotekWorkbenchModerationConfigurationService::setUploadStatus in Lingotek Translation 3.1.x

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

Sets the moderation status ID that triggers an upload.

Parameters

string $entity_type_id: An entity type ID.

string $bundle: A bundle.

string $status: The moderation status ID.

Return value

string The moderation status ID that triggers an upload.

Overrides LingotekModerationConfigurationServiceInterface::setUploadStatus

File

src/Moderation/LingotekWorkbenchModerationConfigurationService.php, line 58

Class

LingotekWorkbenchModerationConfigurationService
Manages workbench moderation settings in the Lingotek integration.

Namespace

Drupal\lingotek\Moderation

Code

public function setUploadStatus($entity_type_id, $bundle, $status) {
  $config = $this->configFactory
    ->getEditable('lingotek.settings');
  $config
    ->set('translate.entity.' . $entity_type_id . '.' . $bundle . '.workbench_moderation.upload_status', $status);
  $config
    ->save();
  return $status;
}