You are here

function instagram_social_feed_entity_info in Instagram Social Feed 8

Same name and namespace in other branches
  1. 7 instagram_social_feed.entity.inc \instagram_social_feed_entity_info()

Implements hook_entity_info().

Defines the tables of this module's data model to Drupal core and Entity API (from contrib):

  • instagram_social_feeds is defined as entity.
  • instagram_social_feed_photos is defined as an entity.

Both Drupal core and Entity API keys and values are defined here.

File

./instagram_social_feed.entity.inc, line 18
Contains Entity API hooks.

Code

function instagram_social_feed_entity_info() {
  $return = array(
    'instagram_social_feeds' => array(
      'module' => 'instagram_social_feed',
      'label' => t('Instagram feed'),
      'plural label' => t('Instagram feeds'),
      'description' => t('An entity type used to store the definitions of an Instagram feed.'),
      'base table' => 'instagram_social_feeds',
      'revision table' => null,
      'entity keys' => array(
        'id' => 'id',
      ),
      'fieldable' => FALSE,
      'view modes' => array(
        'full' => array(
          'label' => t('Full content'),
          'custom settings' => FALSE,
        ),
      ),
      'controller class' => 'EntityAPIController',
      'entity class' => 'Entity',
      'label callback' => 'entity_class_label',
      'uri callback' => 'entity_class_uri',
    ),
    'instagram_social_feed_photos' => array(
      'module' => 'instagram_social_feed',
      'label' => t('Instagram photo'),
      'plural label' => t('Instagram photos'),
      'description' => t('An entity type used to store Instagram photos.'),
      'base table' => 'instagram_social_feed_photos',
      'revision table' => null,
      'entity keys' => array(
        'id' => 'id',
      ),
      'fieldable' => FALSE,
      'view modes' => array(
        'full' => array(
          'label' => t('Full content'),
          'custom settings' => FALSE,
        ),
      ),
      'controller class' => 'EntityAPIController',
      'entity class' => 'Entity',
      'label callback' => 'entity_class_label',
      'uri callback' => 'entity_class_uri',
    ),
  );
  return $return;
}