IdpListBuilder.php in SAML Service Provider 8.3
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'] = $entity
->label();
$row['id'] = $entity
->id();
$row['url'] = $entity
->getLoginUrl();
if (!empty($entity
->id())) {
return $row + parent::buildRow($entity);
}
return $row;
}
}