ContainerListBuilder.php in GoogleTagManager 8
File
src/ContainerListBuilder.php
View source
<?php
namespace Drupal\google_tag;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class ContainerListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = t('Label');
$header['id'] = t('Machine name');
$header['container_id'] = t('Container ID');
$header['weight'] = t('Weight');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['id'] = $entity
->id();
$row['container_id'] = $entity
->get('container_id');
$row['weight'] = $entity
->get('weight');
return $row + parent::buildRow($entity);
}
}