Révision ca0757b9
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/date_ical/date_ical.api.php | ||
---|---|---|
221 | 221 |
$tzid = 'America/New_York'; |
222 | 222 |
} |
223 | 223 |
} |
224 |
|
|
225 |
/** |
|
226 |
* Add an additional custom source to be mapped by a feed. |
|
227 |
* |
|
228 |
* This is useful when you need to map fields from an iCal feed which |
|
229 |
* the Date iCal module does not currently support. |
|
230 |
* |
|
231 |
* @param array $sources |
|
232 |
* An associative array containing the source's properties, as follows: |
|
233 |
* name: The name that will appear in the feed importer Mapping page. |
|
234 |
* description: The description of this field shown in the Mapping page. |
|
235 |
* date_ical_parse_handler: The function in the ParserVcalendar class |
|
236 |
* which should be used to parse this iCal property into a Drupal field. |
|
237 |
*/ |
|
238 |
function hook_date_ical_mapping_sources_alter(&$sources) { |
|
239 |
// Example of what might be done with this alter hook: |
|
240 |
// Add the "ATTENDEE" iCal property to the mapping sources. |
|
241 |
$sources['ATTENDEE'] = array( |
|
242 |
'name' => t('Attendee'), |
|
243 |
'description' => t('The ATTENDEE property.'), |
|
244 |
'date_ical_parse_handler' => 'parseTextProperty', |
|
245 |
); |
|
246 |
// Add "ATTENDEE:CN" parameter to the mapping sources. |
|
247 |
$sources['ATTENDEE:CN'] = array( |
|
248 |
'name' => t('Attendee: CN'), |
|
249 |
'description' => t("The CN parameter of the ATTENDEE property: the attendee's Common Name."), |
|
250 |
'date_ical_parse_handler' => 'parsePropertyParameter', |
|
251 |
); |
|
252 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules