You are here

protected function LingotekManagementFormBase::redirectToClearJobIdMultipleEntitiesForm in Lingotek Translation 4.0.x

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

Redirect to clear Job ID form.

Parameters

array $values: Array of ids to clear Job ID.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

1 call to LingotekManagementFormBase::redirectToClearJobIdMultipleEntitiesForm()
LingotekManagementFormBase::submitForm in src/Form/LingotekManagementFormBase.php
Form submission handler.

File

src/Form/LingotekManagementFormBase.php, line 958

Class

LingotekManagementFormBase
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

protected function redirectToClearJobIdMultipleEntitiesForm($values, FormStateInterface $form_state) {
  $entityInfo = [];
  $entities = $this
    ->getSelectedEntities($values);
  foreach ($entities as $entity) {

    /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
    $language = $entity
      ->getUntranslated()
      ->language();
    $entityInfo[$entity
      ->getEntityTypeId()][$entity
      ->id()] = [
      $language
        ->getId() => $language
        ->getId(),
    ];
  }
  $this->tempStoreFactory
    ->get('lingotek_assign_job_entity_multiple_confirm')
    ->set($this
    ->currentUser()
    ->id(), $entityInfo);
  $form_state
    ->setRedirect('lingotek.clear_job_entity_multiple_form', [], [
    'query' => $this
      ->getDestinationWithQueryArray(),
  ]);
}