You are here

GoogleAdwordsPathConfigListBuilder.php in Google AdWords Conversion Tracking 8

File

modules/google_adwords_path/src/GoogleAdwordsPathConfigListBuilder.php
View source
<?php

/**
 * @file
 * Contains Drupal\google_adwords_path\GoogleAdwordsPathConfigListBuilder.
 */
namespace Drupal\google_adwords_path;

use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;

/**
 * Provides a listing of Google AdWords Path Config entities.
 */
class GoogleAdwordsPathConfigListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['label'] = $this
      ->t('Google AdWords Path Config');
    $header['id'] = $this
      ->t('Machine name');
    return $header + parent::buildHeader();
  }

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    $row['label'] = $this
      ->getLabel($entity);
    $row['id'] = $entity
      ->id();

    // You probably want a few more properties here...
    return $row + parent::buildRow($entity);
  }

}

Classes

Namesort descending Description
GoogleAdwordsPathConfigListBuilder Provides a listing of Google AdWords Path Config entities.