function panelizer_handler_field_link::options_form in Panelizer 7.3
Same name and namespace in other branches
- 7.2 plugins/views/panelizer_handler_field_link.inc \panelizer_handler_field_link::options_form()
Default options form provides the label widget that all fields should have.
Overrides views_handler_field_node_link::options_form
File
- plugins/
views/ panelizer_handler_field_link.inc, line 32
Class
- panelizer_handler_field_link
- 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);
$form['panelizer_tab'] = array(
'#type' => 'select',
'#title' => 'Panelizer tab to link to',
'#options' => $this->tab_map,
'#default_value' => $this->options['panelizer_tab'],
);
$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,
);
}