You are here

function deploy_entity_info in Deploy - Content Staging 7.3

Implements hook_entity_info().

File

./deploy.module, line 86
Deploy module functions.

Code

function deploy_entity_info() {
  $info = [
    'deploy_manager_entities' => [
      'label' => t('Deploy Manager Entity'),
      'entity class' => 'DeployManagerEntitiesEntity',
      'controller class' => 'EntityAPIController',
      'base table' => 'deploy_manager_entities',
      'entity keys' => [
        'id' => 'dme_id',
      ],
      'fieldable' => FALSE,
      'module' => 'deploy',
      'bundles' => [
        'deploy_manager_entities' => [
          'label' => t('Deploy Manager Entity'),
        ],
      ],
      'access callback' => 'deploy_access',
      'label callback' => 'deploy_manager_entities_label',
      'views controller class' => 'DeployManagerEntityViewsController',
    ],
  ];

  // We can only use entity cache if it is enabled.
  if (module_exists('entitycache')) {
    $info['deploy_manager_entities']['entity cache'] = TRUE;
  }
  return $info;
}