function ViewsUiCommentViewsWizard::build_form_style

Overrides ViewsUiBaseViewsWizard::build_form_style

File

plugins/views_wizard/views_ui_comment_views_wizard.class.php, line 26

Class

ViewsUiCommentViewsWizard
Tests creating comment 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 'comment':
            $style_form['row_options']['links'] = array(
                '#type' => 'select',
                '#title_display' => 'invisible',
                '#title' => t('Should links be displayed below each comment'),
                '#options' => array(
                    1 => t('with links (allow users to reply to the comment, etc.)'),
                    0 => t('without links'),
                ),
                '#default_value' => 1,
            );
            break;
    }
}