You are here

function spaces_is_spaces_object in Spaces 7.3

Same name and namespace in other branches
  1. 6.3 spaces.module \spaces_is_spaces_object()

Tests whether the object is part of the current space.

2 calls to spaces_is_spaces_object()
spaces_init in ./spaces.module
Implements hook_init().
spaces_menu_access in ./spaces.module
Spaces menu access callback. Allows space types to manage access as related to their space workflow. See hook_menu_alter() for how menu access callbacks / arguments get passed.

File

./spaces.module, line 861

Code

function spaces_is_spaces_object($type, $object) {
  if ($object_space = spaces_get_space_from_object($type, $object)) {
    if ($current_space = spaces_get_space()) {
      return $object_space->id == $current_space->id && $object_space->type == $current_space->type;
    }
    else {
      return FALSE;
    }
  }
  return TRUE;
}