IdpListBuilder.php in SAML Service Provider 8.2
File
src/Controller/IdpListBuilder.php
View source
<?php
namespace Drupal\saml_sp\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class IdpListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Label');
$header['id'] = $this
->t('Machine name');
$header['url'] = $this
->t('URL');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $this
->getLabel($entity);
$row['id'] = $entity
->id();
$row['url'] = $entity
->login_url();
if (!empty($entity->id)) {
return $row + parent::buildRow($entity);
}
return $row;
}
}