class GdprConsentAgreementEntityUIController in General Data Protection Regulation 7
Custom UI controller for the gdpr_consent_agreement entity type.
Hierarchy
Expanded class hierarchy of GdprConsentAgreementEntityUIController
1 string reference to 'GdprConsentAgreementEntityUIController'
- gdpr_consent_entity_info in modules/
gdpr_consent/ gdpr_consent.module - Implements hook_entity_info().
File
- modules/
gdpr_consent/ gdpr_consent.module, line 776 - Contains hook implementations and shared functions.
View source
class GdprConsentAgreementEntityUIController extends EntityDefaultUIController {
/**
* {@inheritdoc}
*/
public function buildContent($entity, $view_mode = 'default', $langcode = NULL, $content = array()) {
$build = parent::buildContent($entity, $view_mode, $langcode, $content);
$build['description'] = array(
'#type' => 'markup',
'#markup' => check_plain($entity->description),
);
$build['long_description'] = array(
'#type' => 'markup',
'#markup' => check_plain($entity->long_description),
);
$build['notes'] = array(
'#type' => 'markup',
'#markup' => check_plain($entity->notes),
);
$build['agreement_type'] = array(
'#type' => 'markup',
'#markup' => $entity->agreement_type == GDPR_CONSENT_TYPE_EXPLICIT ? t('Explicit') : t('Implicit'),
);
return $build;
}
/**
* {@inheritdoc}
*/
protected function overviewTableHeaders($conditions, $rows, $additional_header = array()) {
$additional_header = array(
t('Type'),
);
return parent::overviewTableHeaders($conditions, $rows, $additional_header);
}
/**
* {@inheritdoc}
*/
protected function overviewTableRow($conditions, $id, $entity, $additional_cols = array()) {
$additional_cols = array(
$entity->agreement_type == GDPR_CONSENT_TYPE_EXPLICIT ? 'Explicit' : 'Implicit',
);
$row = parent::overviewTableRow($conditions, $id, $entity, $additional_cols);
return $row;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
public | property | Defines the number of entries to show per page in overview table. | |
EntityDefaultUIController:: |
public | function | Applies an operation to the given entity. | |
EntityDefaultUIController:: |
public | function | Entity submit builder invoked via entity_ui_form_submit_build_entity(). | |
EntityDefaultUIController:: |
public | function | Provides definitions for implementing hook_forms(). | |
EntityDefaultUIController:: |
public | function | Provides definitions for implementing hook_menu(). | 1 |
EntityDefaultUIController:: |
protected | function | Returns the operation count for calculating colspans. | |
EntityDefaultUIController:: |
public | function | Builds the operation form. | |
EntityDefaultUIController:: |
public | function | Operation form submit callback. | 1 |
EntityDefaultUIController:: |
public | function | Operation form validation callback. | |
EntityDefaultUIController:: |
public | function | Builds the entity overview form. | |
EntityDefaultUIController:: |
public | function | Overview form submit callback. | |
EntityDefaultUIController:: |
public | function | Overview form validation callback. | |
EntityDefaultUIController:: |
public | function | Generates the render array for a overview table for arbitrary entities matching the given conditions. | |
EntityDefaultUIController:: |
public | function | ||
GdprConsentAgreementEntityUIController:: |
public | function | ||
GdprConsentAgreementEntityUIController:: |
protected | function |
Generates the table headers for the overview table. Overrides EntityDefaultUIController:: |
|
GdprConsentAgreementEntityUIController:: |
protected | function |
Generates the row for the passed entity and may be overridden in order to
customize the rows. Overrides EntityDefaultUIController:: |