You are here

public function GdprConsentAgreementEntityUIController::buildContent in General Data Protection Regulation 7

File

modules/gdpr_consent/gdpr_consent.module, line 781
Contains hook implementations and shared functions.

Class

GdprConsentAgreementEntityUIController
Custom UI controller for the gdpr_consent_agreement entity type.

Code

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;
}