function casetracker_entity_info in Case Tracker 7.2
File
- ./
casetracker.module, line 14
Code
function casetracker_entity_info() {
$return['casetracker_project'] = array(
'label' => t('Project'),
'entity class' => 'CaseTrackerProject',
'controller class' => 'CaseTrackerProjectController',
'base table' => 'casetracker_project',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'pid',
'bundle' => 'type',
),
'bundles' => array(),
'bundle keys' => array(
'bundle' => 'type',
),
'view modes' => array(
'full' => array(
'label' => t('Full content'),
'custom settings' => FALSE,
),
'teaser' => array(
'label' => t('Teaser'),
'custom settings' => FALSE,
),
),
'creation callback' => 'casetracker_project_create',
'access callback' => 'casetracker_project_access',
'module' => 'casetracker',
'admin ui' => array(
'path' => 'admin/content/projects',
'file' => 'includes/controllers/ui/CaseTrackerProjectUIController.inc',
'controller class' => 'CaseTrackerProjectUIController',
'menu wildcard' => '%casetracker_project',
),
);
// The entity that holds information about the entity types
$return['casetracker_project_type'] = array(
'label' => t('Project Type'),
'entity class' => 'CaseTrackerProjectType',
'controller class' => 'CaseTrackerProjectTypeController',
'base table' => 'casetracker_project_type',
'fieldable' => FALSE,
'bundle of' => 'casetracker_project',
'exportable' => TRUE,
'entity keys' => array(
'id' => 'id',
'name' => 'type',
'label' => 'label',
),
'access callback' => 'casetracker_project_type_access',
'module' => 'casetracker',
'admin ui' => array(
'path' => 'admin/structure/casetracker/project-types',
'file' => 'casetracker_project_type.inc',
'controller class' => 'CaseTrackerProjectTypeUIController',
),
);
$return['casetracker_case'] = array(
'label' => t('Case'),
'entity class' => 'CaseTrackerCase',
'controller class' => 'CaseTrackerCaseController',
'base table' => 'casetracker_case',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'cid',
'bundle' => 'type',
),
'bundles' => array(),
'bundle keys' => array(
'bundle' => 'type',
),
'creation callback' => 'casetracker_case_create',
'access callback' => 'casetracker_case_access',
'module' => 'casetracker',
'admin ui' => array(
'path' => 'admin/content/cases',
'file' => 'includes/controllers/ui/CaseTrackerCaseUIController.inc',
'controller class' => 'CaseTrackerCaseUIController',
'menu wildcard' => '%casetracker_case',
),
);
// The entity that holds information about the entity types
$return['casetracker_case_type'] = array(
'label' => t('Case Type'),
'entity class' => 'CaseTrackerCaseType',
'controller class' => 'CaseTrackerCaseTypeController',
'base table' => 'casetracker_case_type',
'fieldable' => FALSE,
'bundle of' => 'casetracker_case',
'exportable' => TRUE,
'entity keys' => array(
'id' => 'id',
'name' => 'type',
'label' => 'label',
),
'access callback' => 'casetracker_case_type_access',
'module' => 'casetracker',
'admin ui' => array(
'path' => 'admin/structure/casetracker/case-types',
'file' => 'casetracker_case_type.inc',
'controller class' => 'CaseTrackerCaseTypeUIController',
),
);
return $return;
}