You are here

protected function LingotekManagementFormBase::redirectToAssignJobIdMultipleEntitiesForm in Lingotek Translation 3.5.x

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

Redirect to assign Job ID form.

Parameters

array $values: Array of ids to assign a Job ID.

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

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

File

src/Form/LingotekManagementFormBase.php, line 933

Class

LingotekManagementFormBase
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

protected function redirectToAssignJobIdMultipleEntitiesForm($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.assign_job_entity_multiple_form', [], [
    'query' => $this
      ->getDestinationWithQueryArray(),
  ]);
}