Same name in other branches
- 8.x-1.x src/Plugin/QuickContent/QuickQtabsContent.php \Drupal\quicktabs\Plugin\QuickContent\QuickQtabsContent::optionsForm()
Overrides QuickContent::optionsForm
Fichier
-
plugins/
QuickQtabsContent.inc, line 13
Classe
- QuickQtabsContent
- Class for tab content of type "qtabs" - this is for rendering a QuickSet instance as the tab content of another QuickSet instance.
Code
public function optionsForm($delta, $qt) {
$tab = $this->settings;
$form = array();
$tab_options = array();
foreach (quicktabs_load_multiple() as $machine_name => $info) {
// Do not offer the option to put a tab inside itself.
if (!isset($qt->machine_name) || $machine_name != $qt->machine_name) {
$tab_options[$machine_name] = $info->title;
}
}
$form['qtabs']['machine_name'] = array(
'#type' => 'select',
'#title' => t('Quicktabs instance'),
'#description' => t('The Quicktabs instance to put inside this tab.'),
'#options' => $tab_options,
'#default_value' => isset($tab['machine_name']) ? $tab['machine_name'] : '',
);
return $form;
}