1 views_ui_node_views_wizard.php | protected ViewsUiNodeViewsWizard::build_form_style(&$form, &$form_state, $type) |
Build the part of the form that builds the display format options.
Overrides ViewsUiBaseViewsWizard::build_form_style
File
- core/
modules/ views_ui/ wizards/ views_ui_node_views_wizard.php, line 22 - Definition of ViewsUiNodeViewsWizard.
Class
- ViewsUiNodeViewsWizard
- Tests creating node views with the wizard.
Code
protected function build_form_style(&$form, &$form_state, $type) {
parent::build_form_style($form, $form_state, $type);
$style_form = &$form['displays'][$type]['options']['style'];
// Some style plugins don't support row plugins so stop here if that's the
// case.
if (!isset($style_form['row_plugin']['#default_value'])) {
return;
}
$row_plugin = $style_form['row_plugin']['#default_value'];
switch ($row_plugin) {
case 'full_posts':
case 'teasers':
$style_form['row_options']['title'] = array(
'#type' => 'checkbox',
'#title' => t('Display title'),
'#description' => t('The title will display as a link to each item.'),
'#default_value' => TRUE,
);
$style_form['row_options']['links'] = array(
'#type' => 'checkbox',
'#title' => t('Display links'),
'#description' => t("e.g. 'Read more', 'Add comment', etc."),
'#default_value' => TRUE,
);
$style_form['row_options']['comments'] = array(
'#type' => 'checkbox',
'#title' => t('Display comments'),
'#default_value' => FALSE,
);
break;
}
}