You are here

pmpapi_groups.module in Public Media Platform API Integration 7

File

pmpapi_groups/pmpapi_groups.module
View source
<?php

/**
 * Implements hook_permission().
 */
function pmpapi_groups_permission() {
  return array(
    'administer PMP groups' => array(
      'title' => t('Administer PMP API groups'),
      'description' => t('Perform administration tasks for groups for the PMP API.'),
    ),
  );
}

/**
 * Implements hook_menu().
 */
function pmpapi_groups_menu() {
  $items['admin/config/services/pmp/groups'] = array(
    'title' => 'Groups',
    'page callback' => 'pmpapi_groups_list',
    'access arguments' => array(
      'administer PMP groups',
    ),
    'file' => 'pmpapi_groups.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/services/pmp/groups/add'] = array(
    'title' => 'Add Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pmpapi_groups_edit_form',
    ),
    'access arguments' => array(
      'administer PMP groups',
    ),
    'file' => 'pmpapi_groups.admin.inc',
    'description' => t('Add a PMP group.'),
    'type' => MENU_LOCAL_ACTION,
  );
  $items['admin/config/services/pmp/groups/edit/%'] = array(
    'title' => 'Edit Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pmpapi_groups_edit_form',
      6,
    ),
    'access arguments' => array(
      'administer PMP groups',
    ),
    'file' => 'pmpapi_groups.admin.inc',
    'description' => t('Edit a PMP group.'),
  );
  $items['admin/config/services/pmp/groups/delete/%'] = array(
    'title' => 'Delete Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pmpapi_groups_delete_form',
      6,
    ),
    'access arguments' => array(
      'administer PMP groups',
    ),
    'file' => 'pmpapi_groups.admin.inc',
    'description' => t('Delete a PMP group.'),
  );
  return $items;
}

Functions