You are here

CrossdomainListController.php in Crossdomain 8

File

lib/Drupal/crossdomain/Controller/CrossdomainListController.php
View source
<?php

/**
 * Definition of Drupal\crossdomain\Controller\CrossdomainListController.
 */
namespace Drupal\crossdomain\Controller;

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

/**
 * Provides a listing of domains.
 */
class CrossdomainListController extends ConfigEntityListController {

  /**
   * Overrides Drupal\Core\Entity\EntityListController::buildHeader().
   */
  public function buildHeader() {
    $header['label'] = $this
      ->t('Domain');
    $header['id'] = $this
      ->t('Machine name');
    return $header + parent::buildHeader();
  }

  /**
   * Overrides Drupal\Core\Entity\EntityListController::buildRow().
   */
  public function buildRow(EntityInterface $entity) {
    $row['label'] = $this
      ->getLabel($entity);
    $row['id'] = $entity
      ->id();
    return $row + parent::buildRow($entity);
  }

}

Classes

Namesort descending Description
CrossdomainListController Provides a listing of domains.