You are here

AccessTokenResourceListBuilder.php in Simple OAuth (OAuth2) & OpenID Connect 8

File

src/AccessTokenResourceListBuilder.php
View source
<?php

namespace Drupal\simple_oauth;

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

/**
 * Provides a listing of Access Token Resource entities.
 */
class AccessTokenResourceListBuilder extends ConfigEntityListBuilder {

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