You are here

public function AvailabilityCalendarICalFeedsProcessor::configForm in Availability Calendars 7.5

File

./AvailabilityCalendarICalFeedsProcessor.inc, line 28

Class

AvailabilityCalendarICalFeedsProcessor
@class ICalendar processor for availability calendars.

Code

public function configForm(&$form_state) {
  $form = array();
  $form['skip_hash_check'] = array(
    '#type' => 'checkbox',
    '#title' => t('Skip hash check'),
    '#description' => t('Force update of items even if item source data did not change.'),
    '#default_value' => $this->config['skip_hash_check'],
  );
  $form['availability_calendar_state'] = array(
    '#type' => 'select',
    '#title' => t('Availability state to use for the (unavailable) periods in the iCal feed.'),
    '#options' => availability_calendar_get_states(false, 'label'),
    '#default_value' => $this->config['availability_calendar_state'],
    '#required' => TRUE,
  );
  $entity_infos = entity_get_info();
  $options = array(
    0 => t('Select one'),
  );
  foreach ($entity_infos as $type => $entity_info) {
    $options[$type] = $entity_info['label'];
  }
  $form['entity_type'] = array(
    '#type' => 'select',
    '#title' => t('The entity type of the entity this iCal feed should be added to.'),
    '#options' => $options,
    '#default_value' => $this->config['entity_type'],
    '#required' => TRUE,
  );
  $form['entity_id'] = array(
    '#type' => 'textfield',
    '#title' => t('The entity id of the entity this iCal feed should be added to.'),
    '#default_value' => $this->config['entity_id'],
    '#required' => TRUE,
  );
  return $form;
}