You are here

function oa_core_get_section_context in Open Atrium Core 7.2

Returns the current section id context

Parameters

$node optional current page node:

Return value

int Section ID

7 calls to oa_core_get_section_context()
oa_buttons_add_space_content_render in modules/oa_buttons/plugins/content_types/add_space_content.inc
Renders the widget.
oa_core_create_node in includes/oa_core.util.inc
Create a new content node within a space/section
oa_core_node_delete_redirect in ./oa_core.module
Helper to redirect to proper landing page after content deletion
oa_core_oa_section_ref_views_handler_filter_in_operator::init in plugins/views/oa_core_oa_section_ref_views_handler_filter_in_operator.inc
Provide some extra help to get the operator/value easier to use.
oa_sections_get_best_section in modules/oa_sections/oa_sections.module
Return the best section id to create $node in.

... See full list

File

includes/oa_core.util.inc, line 260
Code for Utility functions for OpenAtrium spaces

Code

function oa_core_get_section_context($node = NULL) {
  if (isset($node) && $node->type == OA_SECTION_TYPE) {
    return $node->nid;
  }
  elseif (defined('OA_SESSION_SECTION') && isset($_SESSION[OA_SESSION_SECTION])) {
    return $_SESSION[OA_SESSION_SECTION];
  }
  else {
    return oa_section_get_section_context();
  }
}