|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * @file |
| 4 | + * Implementes the CM Crew Connect Module |
| 5 | + */ |
| 6 | + |
| 7 | +/** |
| 8 | + * Implements hook_menu() |
| 9 | + */ |
| 10 | +function cm_crew_connect_menu() { |
| 11 | + $items = array(); |
| 12 | + |
| 13 | + $items['user/%/cm_crew_connect'] = |
| 14 | + array( |
| 15 | + 'title' => 'Crew Connect', |
| 16 | + 'description' => 'Crew Connect', |
| 17 | + 'access arguments' => array('access content'), |
| 18 | + 'page callback' => 'cm_crew_connect_page', |
| 19 | + 'page arguments' => array(1), |
| 20 | + 'type' => MENU_LOCAL_TASK, |
| 21 | + ); |
| 22 | + |
| 23 | + $items['crew-connect/requests-search'] = |
| 24 | + array( |
| 25 | + 'title' => 'Crew Connect Search', |
| 26 | + 'description' => 'Crew Connect Search', |
| 27 | + 'access arguments' => array('access content'), |
| 28 | + 'page callback' => 'cm_crew_connect_search_page', |
| 29 | + 'page arguments' => array(1), |
| 30 | + 'type' => MENU_CALLBACK, |
| 31 | + ); |
| 32 | + |
| 33 | + return $items; |
| 34 | +} |
| 35 | + |
| 36 | +/** |
| 37 | + * Implements hook_init(). |
| 38 | + * |
| 39 | + * Loads all the include files |
| 40 | + */ |
| 41 | +function cm_crew_connect_init() { |
| 42 | + drupal_add_css(drupal_get_path('module', 'cm_crew_connect') . |
| 43 | + '/cm_crew_connect.css'); |
| 44 | + |
| 45 | + module_load_include('inc', 'cm_crew_connect', 'includes/computed_field'); |
| 46 | + module_load_include('inc', 'cm_crew_connect', 'includes/civicrm'); |
| 47 | + module_load_include('inc', 'cm_crew_connect', 'includes/form_alter'); |
| 48 | + module_load_include('inc', 'cm_crew_connect', 'includes/form'); |
| 49 | + module_load_include('inc', 'cm_crew_connect', 'includes/menu'); |
| 50 | + module_load_include('inc', 'cm_crew_connect', 'includes/misc'); |
| 51 | + module_load_include('inc', 'cm_crew_connect', 'includes/page'); |
| 52 | + module_load_include('inc', 'cm_crew_connect', 'includes/phpfields'); |
| 53 | + module_load_include('inc', 'cm_crew_connect', 'includes/postsave'); |
| 54 | + module_load_include('inc', 'cm_crew_connect', 'includes/presave'); |
| 55 | + module_load_include('inc', 'cm_crew_connect', 'includes/validate'); |
| 56 | + module_load_include('inc', 'cm_crew_connect', 'includes/view_util'); |
| 57 | +} |
| 58 | + |
| 59 | + |
| 60 | + |
0 commit comments