You are here

ReferenceTypeListBuilder.php in Bibliography & Citation 2.0.x

Same filename and directory in other branches
  1. 8 modules/bibcite_entity/src/ReferenceTypeListBuilder.php

File

modules/bibcite_entity/src/ReferenceTypeListBuilder.php
View source
<?php

namespace Drupal\bibcite_entity;

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

/**
 * Provides a listing of Reference type entities.
 */
class ReferenceTypeListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['label'] = $this
      ->t('Reference type');
    $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
ReferenceTypeListBuilder Provides a listing of Reference type entities.