ConsentAgreementListBuilder.php in General Data Protection Regulation 8
File
modules/gdpr_consent/src/Entity/ConsentAgreementListBuilder.php
View source
<?php
namespace Drupal\gdpr_consent\Entity;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
class ConsentAgreementListBuilder extends EntityListBuilder {
public function buildHeader() {
$header = [
'title' => t('Title'),
'mode' => t('Implicit/Explicit'),
];
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row = [
'title' => $entity
->get('title')->value,
'mode' => $entity
->get('mode')->value,
];
return $row + parent::buildRow($entity);
}
}