public function View::buildOptionsForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/area/View.php \Drupal\views\Plugin\views\area\View::buildOptionsForm()
Provide a form to edit options for this plugin.
Overrides AreaPluginBase::buildOptionsForm
File
- core/
modules/ views/ src/ Plugin/ views/ area/ View.php, line 82 - Contains \Drupal\views\Plugin\views\area\View.
Class
- View
- Views area handlers. Insert a view inside of an area.
Namespace
Drupal\views\Plugin\views\areaCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$view_display = $this->view->storage
->id() . ':' . $this->view->current_display;
$options = array(
'' => $this
->t('-Select-'),
);
$options += Views::getViewsAsOptions(FALSE, 'all', $view_display, FALSE, TRUE);
$form['view_to_insert'] = array(
'#type' => 'select',
'#title' => $this
->t('View to insert'),
'#default_value' => $this->options['view_to_insert'],
'#description' => $this
->t('The view to insert into this area.'),
'#options' => $options,
);
$form['inherit_arguments'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('Inherit contextual filters'),
'#default_value' => $this->options['inherit_arguments'],
'#description' => $this
->t('If checked, this view will receive the same contextual filters as its parent.'),
);
}