PardotContactFormMapListBuilder.php in Pardot Integration 8
File
src/Controller/PardotContactFormMapListBuilder.php
View source
<?php
namespace Drupal\pardot\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class PardotContactFormMapListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Map Label');
$header['contact_form_id'] = $this
->t('Contact Form ID');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['contact_form_id'] = $entity->contact_form_id;
return $row + parent::buildRow($entity);
}
public function render() {
$build['description'] = array(
'#markup' => $this
->t("<p>P.ardot Contact Form Mappings</p>"),
);
$build[] = parent::render();
return $build;
}
}