You are here

function availability_calendar_process_availability_calendar_ical_vevent in Availability Calendars 7.5

Implements hook_process_HOOK for theme availability_calendar_ical_vevent.

  • uid A unique identifier for the event.
  • start The start date of the event (yyyymmdd).
  • end The end date of the event (yyyymmdd).
  • summary A summary of the event (free format).

Parameters

array $variables:

File

./availability_calendar.ical.inc, line 139

Code

function availability_calendar_process_availability_calendar_ical_vevent(&$variables) {
  if (empty($variables['uid'])) {
    $variables['uid'] = $variables['start'] . '-' . $variables['end'] . '.' . str_replace(' ', '', $variables['title']) . '@' . (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']);
  }
  if (empty($variables['summary'])) {
    $variables['summary'] = t('Unavailable', array(), array(
      'langcode' => $variables['langcode'],
    ));
  }
}