function redhen_engagement_entity_info in RedHen CRM 7
Implements hook_entity_info().
File
- modules/
redhen_engagement/ redhen_engagement.module, line 11 - RedhenEngagement hook implementations and API
Code
function redhen_engagement_entity_info() {
$info = array();
$info['redhen_engagement'] = array(
'label' => t('Engagement'),
'plural label' => t('Engagements'),
'controller class' => 'EntityAPIController',
'metadata controller class' => 'RedhenEngagementMetadataController',
'views controller class' => 'RedhenEngagementViewsController',
'entity class' => 'RedhenEngagement',
'base table' => 'redhen_engagement',
'fieldable' => FALSE,
'entity keys' => array(
'id' => 'engagement_id',
),
'bundle keys' => array(
'bundle' => 'name',
),
'bundles' => array(
'redhen_engagement' => array(
'label' => 'Engagements',
),
),
'view modes' => array(
'full' => array(
'label' => t('Full engagement'),
'custom settings' => FALSE,
),
),
'uri callback' => 'entity_class_uri',
'token type' => 'redhen_engagement',
'module' => 'redhen_engagement',
'label callback' => 'entity_class_label',
);
$info['redhen_engagement_score'] = array(
'label' => t('Engagement Score'),
'plural label' => t('Engagement Scores'),
'controller class' => 'EntityAPIControllerExportable',
'entity class' => 'RedhenEngagementScore',
'views controller class' => 'RedhenEngagementScoreViewsController',
'base table' => 'redhen_engagement_score',
'fieldable' => FALSE,
'entity keys' => array(
'id' => 'engagement_score_id',
'label' => 'label',
'name' => 'name',
),
'bundles' => array(
'redhen_engagement_score' => array(
'label' => 'Engagement Scores',
),
),
'admin ui' => array(
'path' => 'admin/structure/redhen/engagement_scores',
'file' => 'redhen_engagement.admin.inc',
'file path' => drupal_get_path('module', 'redhen_engagement') . '/includes',
'controller class' => 'RedhenEngagementScoreUIController',
),
'token type' => 'redhen_engagement_score',
'module' => 'redhen_engagement',
'access callback' => 'redhen_engagement_access',
'exportable' => TRUE,
);
return $info;
}