tour_display module hooks
- Hooks for integrating with the tour display system, this allows modules to list shows on the tour page, tour management page, and tour xml feed
hook_tour_display_fetch_shows
Parameters:
$scope => string - one of 'all', 'past', 'future', 'xml', or 'admin'
Returns:
array() -c of elements per hook_tour_display_fetch_single
Description:
Gather and sort all of the details for upcoming tours that this module is responsible for. $scope allows shows to only display in specific contexts (e.g. upcoming shows should not be displayed on a "past" shows page, BandPage shows cannot be included in the XML feed, etc.)
hook_tour_display_fetch_single
Params:
$id => string - a tour event's unique ID (e.g. a nid or "bandpage_1234")
Returns:
array (
'id' => string - unique ID for this event, recommended to be a simple int prefaced with a module name (e.g. bandpage_17), a drupal nid, or a guid
'title' => string - optional human-readable name for this show (e.g. [date] at [venue] in [city])
'time' => array(
'timestamp' => int - timestamp
'print time' => string - human-readable time
'year' => string - year of event
'weekday' => string - day of the week
'day' => string - day of the month
'month' => string - month number
'month name' => string - month name
)
'location' => array(
'city' => string - city name
'region' => string - state/province/region name
'country' => string - country name
'address' => string - street address
'postal code' => string - zip/postal code
)
'venue' => array(
'name' => string - venue name
'url' => string - venue's URL
'phone' => string - phone number
)
'link' => array(
'text' => string - per the l() function
'url' => string - per the l() function
'opt' => string - per the l() function
)
'details' => array(
'body' => string - body text
'teaser' => string - abbreviated version of body
'price' => string - ticket price
'ticket link' => string - url to buy tickets from
artists' => array() - strings of artist names
)
'actions' => string - 'text to display on the admin form including edit/delete links'
)
Description:
Retreive detailed information about a single tour event.
hook_tour_display_edit_event_form
Params:
$id => string - a tour event's unique ID (e.g. a nid or "bandpage_1234")
$form_state => array - per drupal's form API
Returns:
array - $form array per the drupal forms API (or NULL)
Description:
Generate an edit form including validate, submit, etc functions as needed. A submit button will be appended to the form unless $form['#submit_button_exists'] is set
hook_tour_display_alter
Params:
&$data => array - per drupal_alter (will functionally be an array of rows per theme_table) e.g.
array(0 => array('data' => array(0 => array('data' => '1/1/1111', 'class' => 'tour-date'))))
Returns:
None (edits input passed by reference)
Description:
Allow other modules to alter tour dates before they are displayed.