You are here

function oa_section_context_get_properties in Open Atrium Core 7.2

Property getter callback.

Get the current section from context.

$wrapper = entity_metadata_site_wrapper();
$group = $wrapper->oa_section_context
  ->value();
1 string reference to 'oa_section_context_get_properties'
oa_section_context_entity_property_info in modules/oa_section_context/oa_section_context.module
Implements hook_entity_property_info().

File

modules/oa_section_context/oa_section_context.module, line 110
Provides hook implementations and functionality for oa_section_context.

Code

function oa_section_context_get_properties($data = FALSE, array $options, $name) {
  if ($section_id = oa_section_get_section_context()) {
    return entity_load_single('node', $section_id);
  }
}