protected function WizardPluginBase::page_display_options in Views (for Drupal 7) 8.3
Retrieves the page display options.
Parameters
array $form: The full wizard form array.
array $form_state: The current state of the wizard form.
Return value
array Returns an array of display options.
3 calls to WizardPluginBase::page_display_options()
- Comment::page_display_options in lib/
Views/ comment/ Plugin/ views/ wizard/ Comment.php - Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
- Node::page_display_options in lib/
Views/ node/ Plugin/ views/ wizard/ Node.php - Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
- WizardPluginBase::build_display_options in lib/
Drupal/ views/ Plugin/ views/ wizard/ WizardPluginBase.php - Builds an array of display options for the view.
2 methods override WizardPluginBase::page_display_options()
- Comment::page_display_options in lib/
Views/ comment/ Plugin/ views/ wizard/ Comment.php - Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
- Node::page_display_options in lib/
Views/ node/ Plugin/ views/ wizard/ Node.php - Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
File
- lib/
Drupal/ views/ Plugin/ views/ wizard/ WizardPluginBase.php, line 872 - Definition of Drupal\views\Plugin\views\wizard\WizardPluginBase.
Class
- WizardPluginBase
- Provides the interface and base class for Views Wizard plugins.
Namespace
Drupal\views\Plugin\views\wizardCode
protected function page_display_options(array $form, array &$form_state) {
$display_options = array();
$page = $form_state['values']['page'];
$display_options['title'] = $page['title'];
$display_options['path'] = $page['path'];
$display_options['style'] = array(
'type' => $page['style']['style_plugin'],
);
// Not every style plugin supports row style plugins.
// Make sure that the selected row plugin is a valid one.
$options = $this
->row_style_options();
$display_options['row'] = array(
'type' => isset($page['style']['row_plugin']) && isset($options[$page['style']['row_plugin']]) ? $page['style']['row_plugin'] : 'fields',
);
// If the specific 0 items per page, use no pager.
if (empty($page['items_per_page'])) {
$display_options['pager']['type'] = 'none';
}
elseif (isset($page['pager'])) {
$display_options['pager']['type'] = 'full';
}
else {
$display_options['pager']['type'] = 'some';
}
$display_options['pager']['options']['items_per_page'] = $page['items_per_page'];
// Generate the menu links settings if the user checked the link checkbox.
if (!empty($page['link'])) {
$display_options['menu']['type'] = 'normal';
$display_options['menu']['title'] = $page['link_properties']['title'];
$display_options['menu']['name'] = $page['link_properties']['menu_name'];
}
return $display_options;
}