You are here

function tft_opigno_tool in Taxonomy File Tree 7

Implements hook_opigno_tool().

File

./tft.module, line 223
Module hooks.

Code

function tft_opigno_tool($node = NULL) {
  return array(
    'tft' => array(
      'name' => t("Files"),
      'path' => isset($node) ? "node/{$node->nid}/tft" : '',
      'description' => t("Files related to the course."),
      'actions' => array(
        'add_file' => array(
          'title' => t("Upload a new file"),
          'href' => 'node/add/tft-file',
          'access_arguments' => isset($node) ? array(
            'node',
            $node->nid,
            'create tft_file content',
          ) : array(
            'create tft_file content',
          ),
          'access_callback' => isset($node) ? 'og_user_access' : 'user_access',
          'query' => array(
            'og_group_ref' => isset($node) ? $node->nid : '',
          ),
        ),
      ),
    ),
  );
}