function gdpr_consent_entity_info in General Data Protection Regulation 7
Implements hook_entity_info().
File
- modules/
gdpr_consent/ gdpr_consent.module, line 115 - Contains hook implementations and shared functions.
Code
function gdpr_consent_entity_info() {
$info = array();
$info['gdpr_consent_agreement'] = array(
'label' => t('GDPR Consent Agreement'),
'base table' => 'gdpr_consent_agreement',
'revision table' => 'gdpr_consent_agreement_revision',
'entity class' => 'GdprConsentAgreement',
'controller class' => 'GdprConsentAgreementController',
'fieldable' => TRUE,
'bundles' => array(
'gdpr_consent_agreement' => array(
'label' => t('GDPR Consent Agreement'),
'admin' => array(
'path' => 'admin/config/gdpr/agreements',
'access arguments' => array(
'administer site configuration',
),
),
),
),
'entity keys' => array(
'id' => 'id',
'name' => 'name',
'label' => 'title',
'revision' => 'revision_id',
),
'uri callback' => 'entity_class_uri',
'access callback' => 'gdpr_consent_access_callback',
'admin ui' => array(
'path' => 'admin/config/gdpr/agreements',
'controller class' => 'GdprConsentAgreementEntityUIController',
'menu wildcard' => '%gdpr_consent_agreement',
'file' => 'includes/gdpr_consent.admin.inc',
),
'module' => 'gdpr_consent',
);
return $info;
}