Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function valueForm(&$form, FormStateInterface $form_state)
 {
     parent::valueForm($form, $form_state);
     // Set autocompletion.
     $path = $this->isMultiValued() ? 'admin/views/ajax/autocomplete/user' : 'user/autocomplete';
     $form['value']['#autocomplete_path'] = $path;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function buildExposeForm(&$form, FormStateInterface $form_state)
 {
     parent::buildExposeForm($form, $form_state);
     if ($this->options['type'] != 'select') {
         unset($form['expose']['reduce']);
     }
     $form['error_message'] = array('#type' => 'checkbox', '#title' => $this->t('Display error message'), '#description' => $this->t('Display an error message if one of the entered terms could not be found.'), '#default_value' => !empty($this->options['error_message']));
 }