ProviderListBuilder.php in oEmbed 8
Contains \Drupal\oembed\ProviderListBuilder.
Namespace
Drupal\oembedFile
src/ProviderListBuilder.phpView source
<?php
/**
* @file
* Contains \Drupal\oembed\ProviderListBuilder.
*/
namespace Drupal\oembed;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
/**
* Provides a listing of Provider entities.
*/
class ProviderListBuilder extends ConfigEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['label'] = $this
->t('Provider');
$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
Name | Description |
---|---|
ProviderListBuilder | Provides a listing of Provider entities. |