Same name in other branches
  1. 7.x-3.x plugins/QuickBlockContent.inc \QuickBlockContent::optionsForm()

Overrides QuickContent::optionsForm

File

src/Plugin/QuickContent/QuickBlockContent.php, line 31

Class

QuickBlockContent
Class for tab content of type "block" - this is for rendering a block as tab content. @QuicktabFormat{ id = "quickblockcontent

Namespace

Drupal\quicktabs\Plugin\QuickContent

Code

public function optionsForm($delta, $qt, $form_state) {
    $tab = $this->settings;
    $form = array();
    $form['block']['bid'] = array(
        '#type' => 'select',
        '#options' => quicktabs_get_blocks(),
        '#default_value' => isset($tab['bid']) ? $tab['bid'] : '',
        '#title' => t('Select a block'),
    );
    $form['block']['hide_title'] = array(
        '#type' => 'checkbox',
        '#title' => t('Hide the title of this block'),
        '#default_value' => isset($tab['hide_title']) ? $tab['hide_title'] : 1,
    );
    return $form;
}