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

Overrides QuickContent::optionsForm

Fichier

src/Plugin/QuickContent/QuickCallbackContent.php, line 58

Classe

QuickCallbackContent
Class for tab content of type "callback" - this is for rendering the contents of some menu callback function as tab content. @QuicktabFormat{ id = "quickcallbackcontent"

Namespace

Drupal\quicktabs\Plugin\QuickContent

Code

public function optionsForm($delta, $qt, $form_state) {
    $tab = $this->settings;
    $form = array();
    $form['callback']['path'] = array(
        '#type' => 'textfield',
        '#default_value' => isset($tab['path']) ? $tab['path'] : '',
        '#title' => t('Path'),
        '#element_validate' => array(
            'quicktabs_callback_element_validate',
        ),
    );
    $form['callback']['use_title'] = array(
        '#type' => 'checkbox',
        '#return_value' => TRUE,
        '#title' => 'Use callback title',
        '#default_value' => isset($tab['use_title']) ? $tab['use_title'] : FALSE,
        '#description' => t('Should quicktabs use the rendered title of the callback?'),
    );
    return $form;
}