PardotScoreListBuilder.php in Pardot Integration 8
File
src/Controller/PardotScoreListBuilder.php
View source
<?php
namespace Drupal\pardot\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class PardotScoreListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Score Label');
$header['score_value'] = $this
->t('Pardot Score Value');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['score_value'] = $entity->score_value;
return $row + parent::buildRow($entity);
}
public function render() {
$build['description'] = array(
'#markup' => $this
->t("<p>Pardot Scores for specific paths.</p>"),
);
$build[] = parent::render();
return $build;
}
}