function simplenews_entity_info in Simplenews 7.2
Implements hook_entity_info().
File
- ./
simplenews.module, line 903 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_entity_info() {
return array(
'simplenews_newsletter' => array(
'label' => t('Simplenews newsletter'),
'entity class' => 'SimplenewsNewsletter',
'controller class' => 'SimplenewsNewsletterController',
'metadata controller class' => 'SimplenewsNewsletterMetadataController',
'views controller class' => 'EntityDefaultViewsController',
'base table' => 'simplenews_newsletter',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'newsletter_id',
'label' => 'name',
),
'label callback' => 'entity_class_label',
'uri callback' => 'entity_class_uri',
'view modes' => array(
'full' => array(
'label' => t('Default'),
'custom settings' => FALSE,
),
),
'access callback' => 'simplenews_newsletter_access',
),
'simplenews_subscriber' => array(
'label' => t('Simplenews subscriber'),
'entity class' => 'SimplenewsSubscriber',
'controller class' => 'SimplenewsSubscriberController',
'metadata controller class' => 'SimplenewsSubscriberMetadataController',
'views controller class' => 'EntityDefaultViewsController',
'base table' => 'simplenews_subscriber',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'snid',
'label' => 'mail',
),
'label callback' => 'entity_class_label',
'uri callback' => 'entity_class_uri',
'view modes' => array(
'full' => array(
'label' => t('Default'),
'custom settings' => FALSE,
),
),
'access callback' => 'simplenews_subscriber_access',
),
);
}