You are here

function hook_date_ical_export_html_alter in Date iCal 7.3

Alter the HTML from an event's text fields before they get exported.

Because HTML must be converted to plaintext for iCal spec compliance, this hook exists to allow users to alter the original HTML to ensure that it gets converted into pretty plaintext.

<p>, <h*>, and <div> tags are changed to newlines by the plaintext converter.

Parameters

array $text_fields: A reference to an associative array with the following keys and values:

  • 'description': The description field string.
  • 'summary': The title field string
  • 'location': The location field string.

object $view: The view object that is being executed to render the iCal feed.

array $context: Depending on whether this event is being constructed using the Fields or Entity plugins, this context array will have different keys and values.

Entity Plugin:

  • 'entity_type': The type of entity being rendered (e.g. 'node').
  • 'entity': The fully loaded entity being rendered.
  • 'language': The language code that indicates which translation of field data should be used.

Fields Plugin:

  • 'row': The full Views row object being converted to an event.
  • 'row_index': The index into the query results for this view.
  • 'language': The language code that indicates which translation of field data should be used.
  • 'options': The Fields plugin options.
2 invocations of hook_date_ical_export_html_alter()
date_ical_plugin_row_ical_entity::render in includes/date_ical_plugin_row_ical_entity.inc
Renders the entities returned by the view into event arrays.
date_ical_plugin_row_ical_fields::render in includes/date_ical_plugin_row_ical_fields.inc
Returns an Event array row in the query with index: $row->index.

File

./date_ical.api.php, line 44
Documentation for the hooks provided by Date iCal.

Code

function hook_date_ical_export_html_alter(&$text_fields, $view, $context) {
}