function space_taxonomy::router in Spaces 7.3
Same name and namespace in other branches
- 6.3 spaces_taxonomy/plugins/space_taxonomy.inc \space_taxonomy::router()
- 7 spaces_taxonomy/plugins/space_taxonomy.inc \space_taxonomy::router()
Override of router().
Overrides space_type::router
File
- spaces_taxonomy/
plugins/ space_taxonomy.inc, line 34
Class
- space_taxonomy
- Taxonomy integration for Spaces.
Code
function router($op, $object = NULL) {
switch ($op) {
case 'init':
// NOTE: in D6 this used to handle multiple terms via taxonomy_terms_parse_string
// but in D7 that has gone away for taxonomy term pages
if (implode('/', array(
arg(0),
arg(1),
)) === 'taxonomy/term' && arg(2)) {
$tid = arg(2);
if ($term = taxonomy_term_load($tid)) {
$this
->router_term($term);
}
}
break;
case 'node':
if ($term = spaces_taxonomy_get_term($object)) {
$this
->router_term($term);
}
break;
}
return;
}