You are here

function hook_date_ical_icalcreator_component_alter in Date iCal 7.2

Alter an individual DateIcalIcalcreatorComponent (vevent, valarm, vtodo, etc.) that was parsed from an iCal feed.

Parameters

$component: A DateIcalIcalcreatorComponent. See the definition of this class in includes/DateIcalIcalcreatorParser.inc for more information.

$context: An associative array of context, with the following keys and values:

1 invocation of hook_date_ical_icalcreator_component_alter()
DateIcalIcalcreatorParser::parse in includes/DateIcalIcalcreatorParser.inc
Load and run parser implementation of FeedsParser::parse().

File

./date_ical.api.php, line 163

Code

function hook_date_ical_icalcreator_component_alter(&$component, $context) {

  // Example of what might be done with this alter hook
  if ($component
    ->getComponentType() == 'vevent') {

    // Do something for vevents ...
  }
  if ($component
    ->getComponentType() == 'vtimezone') {

    // Do something different for vtimezones ...
  }
}