You are here

TaxonomyMenuListBuilder.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 modules/taxonomy_menu/src/Controller/TaxonomyMenuListBuilder.php

File

modules/taxonomy_menu/src/Controller/TaxonomyMenuListBuilder.php
View source
<?php

/**
 * @file
 * Contains Drupal\taxonomy_menu\Controller\TaxonomyMenuListBuilder.
 */
namespace Drupal\taxonomy_menu\Controller;

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

/**
 * Provides a listing of TaxonomyMenu.
 */
class TaxonomyMenuListBuilder extends ConfigEntityListBuilder {

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