You are here

function redhen_note_entity_info in RedHen CRM 7

Implements hook_entity_info().

File

modules/redhen_note/redhen_note.module, line 12
Redhen Notes main module

Code

function redhen_note_entity_info() {
  return array(
    'redhen_note' => array(
      'label' => t('Note'),
      'plural label' => t('Notes'),
      'controller class' => 'EntityAPIController',
      'metadata controller class' => 'RedhenNoteMetadataController',
      'entity class' => 'RedhenNote',
      'views controller class' => 'RedhenNoteViewsController',
      'base table' => 'redhen_note',
      'fieldable' => TRUE,
      'entity keys' => array(
        'id' => 'note_id',
      ),
      'bundle keys' => array(
        'bundle' => 'name',
      ),
      'bundles' => array(
        'redhen_note' => array(
          'label' => 'Notes',
          'admin' => array(
            'path' => 'admin/structure/redhen/notes',
            'access arguments' => array(
              'administer redhen notes',
            ),
          ),
        ),
      ),
      'view modes' => array(
        'full' => array(
          'label' => t('Full note'),
          'custom settings' => FALSE,
        ),
        'teaser' => array(
          'label' => t('Teaser'),
          'custom settings' => TRUE,
        ),
      ),
      'uri callback' => 'entity_class_uri',
      'token type' => 'redhen_note',
      'module' => 'redhen_note',
      'label callback' => 'entity_class_label',
    ),
  );
}