public function Eva::validateOptionsForm in EVA: Entity Views Attachment 8.2
Same name and namespace in other branches
- 8 src/Plugin/views/display/Eva.php \Drupal\eva\Plugin\views\display\Eva::validateOptionsForm()
Validate the options form.
Overrides DisplayPluginBase::validateOptionsForm
File
- src/
Plugin/ views/ display/ Eva.php, line 271
Class
- Eva
- The plugin that handles an EVA display in views.
Namespace
Drupal\eva\Plugin\views\displayCode
public function validateOptionsForm(&$form, FormStateInterface $form_state) {
parent::validateOptionsForm($form, $form_state);
switch ($form_state
->get('section')) {
case 'entity_type':
if (empty($form_state
->getValue('entity_type'))) {
$form_state
->setError($form['entity_type'], $this
->t('Must select an entity'));
}
break;
}
}