function party_plugin_display_party_piece::options_form in Party 8.2
Same name and namespace in other branches
- 7 includes/views/party_plugin_display_party_piece.inc \party_plugin_display_party_piece::options_form()
Provide the default form for setting options.
File
- includes/
views/ party_plugin_display_party_piece.inc, line 55 - Views plugin for party pieces.
Class
- party_plugin_display_party_piece
- @file Views plugin for party pieces.
Code
function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
switch ($form_state['section']) {
case 'party_piece_path':
$form['#title'] .= t('Piece path');
$form['party_piece_path'] = array(
'#type' => 'textfield',
'#required' => TRUE,
'#title' => t("The path at which to show this component"),
'#field_prefix' => 'party/%id/',
'#default_value' => $this
->get_option('party_piece_path'),
);
break;
case 'party_piece_label':
$form['#title'] .= t('Piece label');
$form['party_piece_label'] = array(
'#type' => 'textfield',
'#required' => TRUE,
'#title' => t("The label for this component's tab"),
'#default_value' => $this
->get_option('party_piece_label'),
);
break;
}
}