public function LingotekManagementForm::filterForm in Lingotek Translation 8
Form submission handler for filtering.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
- src/
Form/ LingotekManagementForm.php, line 395 - Contains \Drupal\Lingotek\Form\LingotekManagementForm.
Class
- LingotekManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
public function filterForm(array &$form, FormStateInterface $form_state) {
/** @var PrivateTempStore $temp_store */
$temp_store = $this->tempStoreFactory
->get('lingotek.management.filter.' . $this->entityTypeId);
$temp_store
->set('label', $form_state
->getValue([
'filters',
'wrapper',
'label',
]));
$temp_store
->set('profile', $form_state
->getValue([
'filters',
'wrapper',
'profile',
]));
$temp_store
->set('source_language', $form_state
->getValue([
'filters',
'wrapper',
'source_language',
]));
$temp_store
->set('bundle', $form_state
->getValue([
'filters',
'wrapper',
'bundle',
]));
// If we apply any filters, we need to go to the first page again.
$form_state
->setRedirect('<current>');
}