You are here

function flexiform_entity_info in Flexiform 7

Implement hook_entity_info().

We define two entities here - the actual entity that will hold our domain specific information and an entity that holds information about the different types of entities. See here: http://drupal.org/node/977380 for a discussion on this choice.

File

./flexiform.module, line 147
Module for the Flexiform system.

Code

function flexiform_entity_info() {

  // The entity that holds information about the entity types
  $return['flexiform'] = array(
    'label' => t('Flexible Form'),
    'entity class' => 'Flexiform',
    'controller class' => 'FlexiformController',
    'base table' => 'flexiform',
    'fieldable' => FALSE,
    'exportable' => TRUE,
    'entity keys' => array(
      'id' => 'id',
      'name' => 'form',
      'label' => 'label',
    ),
    'access callback' => 'flexiform_access',
    'module' => 'flexiform',
    // Enable the entity API's admin UI.
    'admin ui' => array(
      'path' => 'admin/structure/flexiforms',
      'file' => 'flexiform.admin.inc',
      'controller class' => 'FlexiformUIController',
    ),
  );
  return $return;
}