Retrieves the page display options.
array $form: The full wizard form array.
array $form_state: The current state of the wizard form.
array Returns an array of display options.
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;
}