You are here

function messaging_entity_info in Messaging 7

Implements hook_entity_info().

File

./messaging.module, line 80

Code

function messaging_entity_info() {

  // Notifications_Event
  $info['messaging_message'] = array(
    'label' => t('Message'),
    'controller class' => 'MessagingEntityController',
    'base class' => 'Messaging_Message',
    'base table' => 'messaging_message',
    'entity keys' => array(
      'id' => 'msid',
    ),
  );

  // Notifications_Subscription
  $info['messaging_destination'] = array(
    'label' => t('Destination'),
    'controller class' => 'MessagingEntityController',
    'base class' => 'Messaging_Destination',
    'base table' => 'messaging_destination',
    'entity keys' => array(
      'id' => 'mdid',
    ),
    'view modes' => array(
      // @todo View mode for display as a field (when attached to nodes etc).
      'full' => array(
        'label' => t('Destinations page'),
        'custom settings' => FALSE,
      ),
    ),
  );
  return $info;
}