You are here

public function IdpListBuilder::buildRow in SAML Service Provider 4.x

Same name and namespace in other branches
  1. 8.3 src/Controller/IdpListBuilder.php \Drupal\saml_sp\Controller\IdpListBuilder::buildRow()
  2. 8.2 src/Controller/IdpListBuilder.php \Drupal\saml_sp\Controller\IdpListBuilder::buildRow()
  3. 3.x src/Controller/IdpListBuilder.php \Drupal\saml_sp\Controller\IdpListBuilder::buildRow()

Builds a row for an entity in the entity listing.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.

Return value

array A render array structure of fields for this entity.

Overrides EntityListBuilder::buildRow

See also

\Drupal\Core\Entity\EntityListBuilder::render()

File

src/Controller/IdpListBuilder.php, line 26

Class

IdpListBuilder
Provides a listing of Example.

Namespace

Drupal\saml_sp\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->label();
  $row['id'] = $entity
    ->id();
  $row['url'] = $entity
    ->getLoginUrl();

  // You probably want a few more properties here...
  if (!empty($entity
    ->id())) {
    return $row + parent::buildRow($entity);
  }
  return $row;
}