public function LingotekManagementFormBase::resetFilterForm in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 4.0.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.0.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.1.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.2.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.3.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.4.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.5.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.6.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
- 3.7.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::resetFilterForm()
Form submission handler for resetting the filters.
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/ LingotekManagementFormBase.php, line 437
Class
- LingotekManagementFormBase
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
public function resetFilterForm(array &$form, FormStateInterface $form_state) {
/** @var \Drupal\user\PrivateTempStore $temp_store */
$temp_store = $this->tempStoreFactory
->get($this
->getTempStorageFilterKey());
$keys = $this
->getFilterKeys();
foreach ($keys as $key) {
// Reset the filter, no matter if it's under 'wrapper' or 'advanced_filters.'
$temp_store
->delete($key[1]);
}
}