You are here

EntityLegalDocumentListBuilder.php in Entity Legal 8

File

src/Controller/EntityLegalDocumentListBuilder.php
View source
<?php

/**
 * @file
 * Contains \Drupal\entity_legal\Controller\EntityLegalDocumentListBuilder.
 */
namespace Drupal\entity_legal\Controller;

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

/**
 * Provides a listing of legal documents.
 */
class EntityLegalDocumentListBuilder extends ConfigEntityListBuilder {

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

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

}

Classes

Namesort descending Description
EntityLegalDocumentListBuilder Provides a listing of legal documents.