public function AdministrativeArea::buildExposedForm in Address 8
Render our chunk of the exposed filter form when selecting
You can override this if it doesn't do what you expect.
Overrides FilterPluginBase::buildExposedForm
File
- src/
Plugin/ views/ filter/ AdministrativeArea.php, line 546
Class
- AdministrativeArea
- Filter by administrative area.
Namespace
Drupal\address\Plugin\views\filterCode
public function buildExposedForm(&$form, FormStateInterface $form_state) {
parent::buildExposedForm($form, $form_state);
// Hide the form element if we have no options to select.
// (e.g. the country isn't set or it doesn't use administrative areas).
if (empty($this->valueOptions)) {
$identifier = $this->options['expose']['identifier'];
$form[$identifier]['#access'] = FALSE;
}
}