You are here

function mailchimp_signup_entity_info in Mailchimp 7.3

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_entity_info()
  2. 7.4 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_entity_info()

Implements hook_entity_info().

File

modules/mailchimp_signup/mailchimp_signup.module, line 169
Mailchimp Signup module. Allows creation of signup forms integrated with Mailchimp.

Code

function mailchimp_signup_entity_info() {
  $entities = array(
    'mailchimp_signup' => array(
      'label' => t('MailChimp Signup'),
      'plural label' => t('MailChimp Signups'),
      'entity class' => 'MailchimpSignup',
      'controller class' => 'EntityAPIControllerExportable',
      'base table' => 'mailchimp_signup',
      'uri callback' => 'entity_class_uri',
      'fieldable' => FALSE,
      'exportable' => TRUE,
      'label callback' => 'mailchimp_signup_entity_info_label',
      'module' => 'mailchimp_signup',
      'entity keys' => array(
        'id' => 'mcs_id',
        'name' => 'name',
      ),
      'bundles' => array(
        'mailchimp_signup' => array(
          'label' => t('MailChimp Signup'),
        ),
      ),
      'view modes' => array(
        'full' => array(
          'label' => t('Full'),
          'custom settings' => FALSE,
        ),
      ),
      // Enable the entity API's admin UI.
      'admin ui' => array(
        'path' => 'admin/config/services/mailchimp/signup',
        'file' => 'includes/mailchimp_signup.admin.inc',
        'controller class' => 'MailChimpSignupUIController',
      ),
      'access callback' => 'mailchimp_signup_entity_access',
    ),
  );
  return $entities;
}