pmperson.module in Drupal PM (Project Management) 7.3
Hook implementations for the pmperson module.
File
pmperson/pmperson.module
View source
<?php
define('PMPERSON_RESOLVE_DEPENDENCIES_LINK', 'admin/config/pm/pmperson_migration');
function pmperson_menu() {
module_load_include('inc', 'pmperson', 'includes/pmperson.migrate');
$items = array();
if (pmperson_migrate_update_could_be_performed() == FALSE) {
$items[PMPERSON_RESOLVE_DEPENDENCIES_LINK] = array(
'title' => 'PM Person migration conflicts',
'page callback' => 'pmperson_migrate_page_callback',
'access callback' => 'pmperson_update_access_allowed',
'type' => MENU_NORMAL_ITEM,
'file' => 'includes/pmperson.migrate.inc',
);
}
return $items;
}
function pmperson_update_access_allowed() {
global $update_free_access, $user;
if (!empty($update_free_access)) {
return TRUE;
}
try {
require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';
return user_access('administer software updates');
} catch (Exception $e) {
return $user->uid == 1;
}
}
function pmperson_forms($form_id, $args) {
$forms = array();
if (substr($form_id, 0, 35) == 'pmperson_migrate_email_adjust_form_') {
$forms[$form_id] = array(
'callback' => 'pmperson_migrate_email_adjust_form',
);
}
return $forms;
}
function pmperson_permission() {
return array(
'Project Management Person: access' => array(
'title' => t('Access PM Person'),
'description' => t('Allows the user to see pages and blocks associated with the PM Person module, but does not control which persons are shown within them.'),
),
);
}
function pmperson_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "field_group" && $api == "field_group") {
return array(
"version" => "1",
);
}
}