function casetracker_project_get_types in Case Tracker 7.2
Gets an array of all casetracker_project types, keyed by the type name.
Parameters
$type_name: If set, the type with the given name is returned.
Return value
CaseTrackerProjectType[] Depending whether $type isset, an array of casetracker_project types or a single one.
6 calls to casetracker_project_get_types()
- CaseTrackerProjectUIController::hook_menu in includes/
controller/ ui/ CaseTrackerProjectUIController.inc - Overrides hook_menu() defaults. Main reason for doing this is that parent class hook_menu() is optimized for entity type administration.
- casetracker_entity_info_alter in ./
casetracker.module - Implements hook_entity_info_alter().
- casetracker_forms in ./
casetracker.module - Implements hook_forms().
- casetracker_menu_local_tasks_alter in ./
casetracker.module - Implements hook_menu_local_tasks_alter().
- casetracker_permission in ./
casetracker.module - Implements hook_permission().
1 string reference to 'casetracker_project_get_types'
- casetracker_project_type_form in ./
casetracker_project_type.inc - Generates the project type editing form.
File
- ./
casetracker_project.inc, line 47 - This file concentrates all general functionality related to Projects in Case Tracker, leaving to the other files in /admin the stuff related to CRUD and structural configuration
Code
function casetracker_project_get_types($type_name = NULL) {
// entity_load will get the Entity controller for our casetracker_project entity
// and call the load function of that object - we are loading entities by name here.
$types = entity_load_multiple_by_name('casetracker_project_type', isset($type_name) ? array(
$type_name,
) : FALSE);
return isset($type_name) ? reset($types) : $types;
}