You are here

function hook_opigno_widget_view in Opigno 7.0

Implements hook_opigno_widget_view()

Returns the widget subject and content. Must return an array identical to that of hook_block_view()

Return value

array

1 function implements hook_opigno_widget_view()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

opigno_opigno_widget_view in ./opigno.module
Implements hook_opigno_widget_view()
1 invocation of hook_opigno_widget_view()
opigno_block_view in ./opigno.module
Implements hook_block_view()

File

./opigno.api.php, line 37
Defines the Opigno LMS specific API and hooks

Code

function hook_opigno_widget_view($group, $delta) {

  // First check our block
  switch ($delta) {
    case 'og_tools':
      $html = '';
      if (isset($group->gid)) {
        $tools = opigno_get_og_tools($group);
        $html = theme('opigno__add_content_to_og_list', array(
          'tools' => $tools,
        ));
      }
      return array(
        'subject' => t("Add content"),
        'content' => $html,
      );
  }
}