public function View::buildOptionsForm in Views (for Drupal 7) 8.3
Same name in this branch
- 8.3 lib/Views/node/Plugin/views/row/View.php \Views\node\Plugin\views\row\View::buildOptionsForm()
- 8.3 lib/Views/comment/Plugin/views/row/View.php \Views\comment\Plugin\views\row\View::buildOptionsForm()
- 8.3 lib/Views/search/Plugin/views/row/View.php \Views\search\Plugin\views\row\View::buildOptionsForm()
- 8.3 lib/Drupal/views/Plugin/views/area/View.php \Drupal\views\Plugin\views\area\View::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides AreaPluginBase::buildOptionsForm
File
- 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\areaCode
public function buildOptionsForm(&$form, &$form_state) {
parent::buildOptionsForm($form, $form_state);
$view_display = $this->view->storage->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.'),
);
}