You are here

function space::router in Spaces 6.2

Same name and namespace in other branches
  1. 5.2 spaces.module \space::router()
  2. 6 spaces.module \space::router()

Master router method that allows the space type to define routing workflow rules. Currently called at the following hooks:

hook_menu(), where $may_cache == FALSE hook_nodeapi(), where $op == 'view' hook_form_alter(), when editing a node hook_user(), where $op == 'view'

Parameters

$op: The current hook from which the router is being called. Can be one of the following: 'menu', 'node view', 'node form', 'user view'

$object: The object relevant to the current $op called. e.g. when $op == 'node view', $object is the node object.

$is_active: Boolean for whether this router has been called as part of a fully instantiated space object. If FALSE, the router should not assume the space has been fully constructed and should take the appropriate actions as necessary.

Return value

bool TRUE to allow the user to pass through. FALSE to return a drupal_access_denied() page to the user.

File

./spaces.module, line 441

Class

space
Interface for space objects.

Code

function router($op, $object = NULL, $is_active = TRUE);