function InputRequired::pre_render in Views (for Drupal 7) 8.3
Overrides ExposedFormPluginBase::pre_render
File
- lib/
Drupal/ views/ Plugin/ views/ exposed_form/ InputRequired.php, line 74  - Definition of Drupal\views\Plugin\views\exposed_form\InputRequired.
 
Class
- InputRequired
 - Exposed form plugin that provides an exposed form with required input.
 
Namespace
Drupal\views\Plugin\views\exposed_formCode
function pre_render($values) {
  if (!$this
    ->exposed_filter_applied()) {
    $options = array(
      'id' => 'area',
      'table' => 'views',
      'field' => 'area',
      'label' => '',
      'relationship' => 'none',
      'group_type' => 'group',
      'content' => $this->options['text_input_required'],
      'format' => $this->options['text_input_required_format'],
    );
    $handler = views_get_handler('views', 'area', 'area');
    $handler
      ->init($this->view, $options);
    $this->displayHandler->handlers['empty'] = array(
      'area' => $handler,
    );
    $this->displayHandler
      ->setOption('empty', array(
      'text' => $options,
    ));
  }
}