You are here

public static function DateiCalFeedsParser::getiCalMappingSources in Date iCal 7.3

Creates the list of mapping sources offered by DateiCalFeedsParser.

1 call to DateiCalFeedsParser::getiCalMappingSources()
DateiCalFeedsParser::getMappingSources in includes/DateiCalFeedsParser.inc
Implements FeedsParser::getMappingSources().

File

includes/DateiCalFeedsParser.inc, line 152
DateiCalFeedsParser is Date iCal's Feeds parser plugin.

Class

DateiCalFeedsParser
@file DateiCalFeedsParser is Date iCal's Feeds parser plugin.

Code

public static function getiCalMappingSources() {
  $sources = array();
  $sources['SUMMARY'] = array(
    'name' => t('Summary/Title'),
    'description' => t('The SUMMARY property. A short summary (usually the title) of the event.
        A title is required for every node, so you need to include this source and have it mapped to the node title, except under unusual circumstances.'),
    'date_ical_parse_handler' => 'parseTextProperty',
  );
  $sources['COMMENT'] = array(
    'name' => t('Comment'),
    'description' => t('The COMMENT property. A text comment is allowed on most components.'),
    'date_ical_parse_handler' => 'parseTextProperty',
  );
  $sources['DESCRIPTION'] = array(
    'name' => t('Description'),
    'description' => t('The DESCRIPTION property. A more complete description of the event than what is provided by the Summary.'),
    'date_ical_parse_handler' => 'parseTextProperty',
  );
  $sources['DTSTART'] = array(
    'name' => t('Date: Start'),
    'description' => t('The DTSTART property. The start time of each event in the feed.'),
    'date_ical_parse_handler' => 'parseDateTimeProperty',
  );
  $sources['DTEND'] = array(
    'name' => t('Date: End'),
    'description' => t('THE DTEND or DURATION property. The end time (or duration) of each event in the feed.'),
    'date_ical_parse_handler' => 'parseDateTimeProperty',
  );
  $sources['RRULE'] = array(
    'name' => t('Date: Repeat Rule'),
    'description' => t('The RRULE property. Describes when and how often this event should repeat.
        The date field for the target node must be configured to support repeating dates, using the Date Repeat Field module (a submodule of Date).'),
    'date_ical_parse_handler' => 'parseRepeatProperty',
  );
  $sources['UID'] = array(
    'name' => 'UID',
    'description' => t('The UID property. Each event must have a UID if you wish for the import process to be able to update previously-imported nodes.
        If used, this field MUST be set to Unique.'),
    'date_ical_parse_handler' => 'parseTextProperty',
  );
  $sources['URL'] = array(
    'name' => 'URL',
    'description' => t('The URL property. Some feeds specify a URL for the event using this property.'),
    'date_ical_parse_handler' => 'parseTextProperty',
  );
  $sources['LOCATION'] = array(
    'name' => t('Location'),
    'description' => t('The LOCATION property. Can be mapped to a text field, or the title of a referenced node.'),
    'date_ical_parse_handler' => 'parseTextProperty',
  );
  $sources['LOCATION:ALTREP'] = array(
    'name' => t('Location: ALTREP'),
    'description' => t('The ALTREP value of the LOCATION property. Additional location information, usually a URL to a page with more info.'),
    'date_ical_parse_handler' => 'parsePropertyParameter',
  );
  $sources['CATEGORIES'] = array(
    'name' => t('Categories'),
    'description' => t('The CATEGORIES property. Catagories that describe the event, which can be imported into taxonomy terms.'),
    'date_ical_parse_handler' => 'parseMultivalueProperty',
  );

  // Allow other modules to add custom source fields.
  drupal_alter('date_ical_mapping_sources', $sources);
  return $sources;
}