You are here

SharerichListBuilder.php in Sharerich 8

Contains \Drupal\sharerich\SharerichListBuilder.

File

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

/**
 * @file
 * Contains \Drupal\sharerich\SharerichListBuilder.
 */
namespace Drupal\sharerich\Controller;

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

/**
 * Provides a listing of Sharerich entities.
 */
class SharerichListBuilder extends ConfigEntityListBuilder {

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