protected function AvailabilityCalendarsStylesFormBuilder::fieldsetStates in Availability Calendars 6.2
Same name and namespace in other branches
- 7.2 availability_calendars.styles.inc \AvailabilityCalendarsStylesFormBuilder::fieldsetStates()
Helper method to return the fieldset for the states styles
Return value
array an array with a number of form elements in a fieldset
1 call to AvailabilityCalendarsStylesFormBuilder::fieldsetStates()
File
- ./
availability_calendars.styles.inc, line 217
Class
Code
protected function fieldsetStates() {
$this->currentFieldset = 'states';
$this->form[$this->currentFieldset] = array(
'#type' => 'fieldset',
'#title' => t('States'),
'#description' => t('Styles that define how the states will be displayed.'),
);
$this
->selectField('split-day', array(
'/',
'\\',
'|',
'―',
));
// translate the title 'Split day' but only after creating the form element (or this value
// won't be retrieved from the variable if showing this screen in another language).
$this->form[$this->currentFieldset]['Split day']['#title'] = t('How to render a split day');
$states = availability_calendars_get_states();
foreach ($states as $class => $state) {
$this
->colorField(array(
$state['class'] => $state['label'],
));
}
}