function views_handler_field_megarow_links::options_form in Views Megarow 7
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
File
- includes/
views/ handlers/ views_handler_field_megarow_links.inc, line 20
Class
- views_handler_field_megarow_links
- Megarow handler that outputs the links which open the megarow.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['megarow'] = array(
'#type' => 'fieldset',
'#title' => t('Megarow Settings'),
);
$form['megarow']['links'] = array(
'#type' => 'textarea',
'#title' => t('Links'),
'#description' => t('Enter one link per line, in the format label|url.'),
'#default_value' => $this->options['megarow']['links'],
);
// Token item.
if (module_exists('token')) {
// Add token module replacements fields
$form['megarow']['tokens'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Placeholder tokens'),
'#description' => t("The following placeholder tokens can be used in the edit, preview and revisions links. When used in a path they will be replaced with the appropriate values."),
);
$token_type = array(
'theme' => 'token_tree',
'token_types' => array(
$this
->getTokenType(),
),
'global_types' => TRUE,
'click_insert' => TRUE,
'dialog' => TRUE,
);
$form['megarow']['tokens']['help'] = array(
'#type' => 'markup',
'#markup' => theme('token_tree', $token_type),
);
}
}