public function View::buildOptionsForm

Default options form that provides the label widget that all fields should have.

Overrides AreaPluginBase::buildOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/View.php, line 35
Definition of Drupal\views\Plugin\views\area\View.

Class

View
Views area handlers. Insert a view inside of an area.

Namespace

Drupal\views\Plugin\views\area

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $view_display = $this->view->storage
    ->get('name') . ':' . $this->view->current_display;
  $options = array(
    '' => t('-Select-'),
  );
  $options += views_get_views_as_options(FALSE, 'all', $view_display, FALSE, TRUE);
  $form['view_to_insert'] = array(
    '#type' => 'select',
    '#title' => t('View to insert'),
    '#default_value' => $this->options['view_to_insert'],
    '#description' => t('The view to insert into this area.'),
    '#options' => $options,
  );
  $form['inherit_arguments'] = array(
    '#type' => 'checkbox',
    '#title' => t('Inherit contextual filters'),
    '#default_value' => $this->options['inherit_arguments'],
    '#description' => t('If checked, this view will receive the same contextual filters as its parent.'),
  );
}