You are here

PresentationListBuilder.php in Isotope (with Masonry and Packery) 8

File

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

/**
 * @file
 * Contains \Drupal\isotope\Controller\PresentationListBuilder.
 */
namespace Drupal\isotope\Controller;

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

/**
 * Provides a listing of Presentations.
 */
class PresentationListBuilder extends ConfigEntityListBuilder {

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