You are here

function bootstrap_tour_entity_info in Bootstrap Tour 7.2

Implements hook_entity_info().

File

./bootstrap_tour.module, line 11
bootstrap_tour.module

Code

function bootstrap_tour_entity_info() {

  // If this is called too early before update runs, it'll fatal.
  if (!module_exists('inline_entity_form')) {
    return array();
  }
  $bootstrap_tour_entity_info['bootstrap_tour'] = array(
    'label' => t('Site Tour'),
    'entity class' => 'Entity',
    'controller class' => 'BootstrapTourEntityController',
    'base table' => 'bootstrap_tour_tour',
    'fieldable' => TRUE,
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'bootstrap_tour_id',
      'label' => 'title',
      'name' => 'name',
    ),
    'static cache' => TRUE,
    'admin ui' => array(
      'path' => 'admin/structure/tours',
      'controller class' => 'BootstrapTourUIController',
      'file' => 'includes/bootstrap_tour.admin.inc',
    ),
    'module' => 'bootstrap_tour',
    'access callback' => 'bootstrap_tour_admin_access',
    'views controller class' => 'EntityDefaultViewsController',
    'bundles' => array(
      // Entity defaults to entity type for single bundles.
      'bootstrap_tour' => array(
        'label' => t('Site Tour'),
        'admin' => array(
          'path' => 'admin/structure/tours',
          'access arguments' => array(
            'administer bootstrap tours',
          ),
        ),
      ),
    ),
  );
  $bootstrap_tour_entity_info['bootstrap_tour_step'] = array(
    'label' => t('Site Tour Step'),
    'entity class' => 'Entity',
    'controller class' => 'EntityAPIController',
    'base table' => 'bootstrap_tour_step',
    'fieldable' => FALSE,
    'entity keys' => array(
      'id' => 'bootstrap_tour_step_id',
      'label' => 'title',
      'name' => 'name',
    ),
    'static cache' => TRUE,
    'module' => 'bootstrap_tour',
    'access callback' => 'bootstrap_tour_admin_access',
    'views controller class' => 'EntityDefaultViewsController',
    'inline entity form' => array(
      'controller' => 'BootstrapTourStepInlineEntityFormController',
      'file' => 'includes/bootstrap_tour_step.inline_entity_form.inc',
    ),
  );
  return $bootstrap_tour_entity_info;
}