function entity_legal_entity_info in Entity Legal 7
Same name and namespace in other branches
- 7.2 entity_legal.module \entity_legal_entity_info()
Implements hook_entity_info().
File
- ./
entity_legal.module, line 21 - Entity Legal module.
Code
function entity_legal_entity_info() {
$return = array(
ENTITY_LEGAL_DOCUMENT_ENTITY_NAME => array(
'label' => t('Legal document'),
'entity class' => 'EntityLegalDocument',
'controller class' => 'EntityLegalDocumentController',
'base table' => 'entity_legal_document',
'uri callback' => 'entity_class_uri',
'menu wildcard' => 'entity_legal_document',
'access callback' => 'entity_legal_document_access',
'fieldable' => FALSE,
'entity keys' => array(
'id' => 'name',
'name' => 'name',
'label' => 'label',
),
'bundle keys' => array(
'bundle' => 'name',
),
'label callback' => 'entity_class_label',
'exportable' => TRUE,
'module' => 'entity_legal',
'admin ui' => array(
'path' => 'admin/structure/legal',
'file' => 'entity_legal.admin.inc',
'controller class' => 'EntityLegalDocumentUIController',
),
),
ENTITY_LEGAL_DOCUMENT_VERSION_ENTITY_NAME => array(
'label' => t('Legal document version'),
'entity class' => 'EntityLegalDocumentVersion',
'controller class' => 'EntityLegalDocumentVersionController',
'base table' => 'entity_legal_document_version',
'access callback' => 'entity_legal_document_access',
'fieldable' => TRUE,
'exportable' => TRUE,
'entity keys' => array(
'id' => 'vid',
'name' => 'name',
'label' => 'label',
'bundle' => 'document_name',
),
'bundle keys' => array(
'bundle' => 'document_name',
),
'bundles' => array(),
'bundle of' => ENTITY_LEGAL_DOCUMENT_ENTITY_NAME,
'module' => 'entity_legal',
'admin ui' => array(
'path' => 'admin/structure/legal/manage/%',
'file' => 'entity_legal.admin.inc',
'controller class' => 'EntityLegalDocumentVersionUIController',
),
),
ENTITY_LEGAL_DOCUMENT_ACCEPTANCE_ENTITY_NAME => array(
'label' => t('Legal document acceptance'),
'entity class' => 'EntityLegalDocumentAcceptance',
'controller class' => 'EntityLegalDocumentAcceptanceController',
'base table' => 'entity_legal_document_acceptance',
'access callback' => 'entity_legal_document_acceptance_access',
'fieldable' => TRUE,
'entity keys' => array(
'id' => 'aid',
),
'label callback' => 'entity_class_label',
'exportable' => FALSE,
'module' => 'entity_legal',
),
);
return $return;
}