You are here

function opigno_og_tools_block in Opigno 7.0

OG Tools block. Displays all available OG tools, with links ot the appropriate overview pages.

Parameters

object $group: The current group from og_context

Return value

array

1 call to opigno_og_tools_block()
opigno_opigno_widget_view in ./opigno.module
Implements hook_opigno_widget_view()

File

includes/opigno.block.inc, line 17
Contains all block definitions

Code

function opigno_og_tools_block($group) {
  $html = '';
  if (isset($group->gid)) {
    $tools = opigno_get_og_tools($group);
    foreach ($tools as $machine_name => $tool) {
      $html .= theme('opigno__og_tool', array(
        'machine_name' => $machine_name,
        'name' => $tool['tool_name'],
        'url' => $tool['tool_url'],
      ));
    }
  }
  return array(
    'subject' => t("Tools"),
    'content' => $html,
  );
}