function panelizer_handler_panelizer_status::options_form in Panelizer 7.3
Same name and namespace in other branches
- 7.2 plugins/views/panelizer_handler_panelizer_status.inc \panelizer_handler_panelizer_status::options_form()
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
File
- plugins/
views/ panelizer_handler_panelizer_status.inc, line 15
Class
- panelizer_handler_panelizer_status
- Views field handler for rendering node links that point to panelizer tabs.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$entity_type = $this->definition['entity_type'];
$handler = panelizer_entity_plugin_get_handler($entity_type);
$view_modes = array();
foreach ($handler->plugin['view modes'] as $view_mode => $view_mode_info) {
$view_modes[$view_mode] = $view_mode_info['label'];
}
$form['view_mode'] = array(
'#type' => 'select',
'#title' => t('View mode'),
'#options' => $view_modes,
);
$form['custom'] = array(
'#type' => 'textfield',
'#title' => t('Customized text'),
'#default_value' => $this->options['custom'],
'#description' => t('Text to display if the entity has a custom display.'),
);
$form['not_panelized'] = array(
'#type' => 'textfield',
'#title' => t('Not panelized text'),
'#default_value' => $this->options['not_panelized'],
'#description' => t('Text to display if the entity is not panelized.'),
);
}