Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_field_info().
- *
- */
- function emtr_field_info() {
- return array(
- // We name our field as the associative name of the array.
- 'field_emtr_denominations' => array(
- 'label' => t('Denominations'),
- 'description' => t('Field linked to target entity as well as denomination taxonomy term holding denomnation value.'),
- 'default_widget' => 'number',
- 'default_formatter' => 'number_decimal',
- ),
- );
- }
- /**
- * Implement hook_entity_info().
- *
- */
- function emtr_entity_info() {
- $return['emtr'] = array(
- 'label' => t('EMTR'),
- 'plural label' => t('EMTRs'),
- 'description' => t('An entity which stores all the emtr data for one shift in one unit.'),
- 'entity class' => 'EMTR',
- 'controller class' => 'EMTRController',
- 'base table' => 'emtr',
- 'fieldable' => FALSE,
- 'entity keys' => array(
- 'id' => 'emtr_id',
- ),
- 'label callback' => 'entity_class_label',
- 'uri callback' => 'entity_class_uri',
- 'creation callback' => 'emtr_create',
- 'access callback' => 'emtr_access',
- 'module' => 'emtr',
- );
- $return['emtr_safe_check'] = array(
- 'label' => t('EMTR Safe Check'),
- 'plural label' => t('EMTR Safe Checks'),
- 'description' => t('An entity which holds safe check data. Can be multiple safe checks per emtr.'),
- 'entity class' => 'EMTRSafeCheck',
- 'controller class' => 'EMTRSafeCheckController',
- 'base table' => 'emtr_safe_check',
- 'revision table' => 'emtr_safe_check_revision',
- 'fieldable' => FALSE,
- 'entity keys' => array(
- 'id' => 'safe_check_id',
- 'revision' => 'vid',
- ),
- 'bundles' => array(
- 'emtr_safe_check'=> array(
- 'label' => 'EMTR Safe Check',
- ),
- ),
- 'label callback' => 'entity_class_label',
- 'uri callback' => 'entity_class_uri',
- 'creation callback' => 'emtr_create',
- 'access callback' => 'emtr_access',
- 'module' => 'emtr',
- );
- return $return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement