function opigno_get_og_tools in Opigno 7.0
Returns the list tools for the OG node.
Parameters
object $group:
bool $only_active = TRUE:
Return value
array
4 calls to opigno_get_og_tools()
- hook_opigno_widget_view in ./
opigno.api.php - Implements hook_opigno_widget_view()
- opigno_og_add_content_block in includes/
opigno.block.inc - OG Add content block. Display links to create content for the current OG.
- opigno_og_tools_block in includes/
opigno.block.inc - OG Tools block. Displays all available OG tools, with links ot the appropriate overview pages.
- _opigno_form_og_node_form_alter in ./
opigno.module - Helper function for altering OG forms
File
- ./
opigno.module, line 363 - Contains all hook_implementations and module specific API.
Code
function opigno_get_og_tools($group, $only_active = TRUE) {
$node = opigno_get_og_node($group);
$tools = module_invoke_all('opigno_tools', $node);
if ($only_active) {
$all_tools = $tools;
$tools = array();
foreach (variable_get('opigno_og_tools_nid_' . $node->nid, array()) as $tool => $active) {
if ($active) {
$tools[$tool] = $all_tools[$tool];
}
}
}
return $tools;
}