public function Oauth2ClientListBuilder::buildRow in Simple OAuth (OAuth2) & OpenID Connect 8.2
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/
Oauth2ClientListBuilder.php, line 31
Class
- Oauth2ClientListBuilder
- Defines a class to build a listing of Access Token entities.
Namespace
Drupal\simple_oauthCode
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\simple_oauth\Entity\Oauth2ClientInterface */
$row['uuid'] = $entity
->uuid();
$row['label'] = Link::createFromRoute($entity
->label(), 'entity.oauth2_client.edit_form', array(
'oauth2_client' => $entity
->id(),
));
$row['confidential'] = $entity
->isConfidential() ? $this
->t('Confidential') : $this
->t('Not Confidential');
// $row['redirect'] = NULL;
// if ($redirect_url = $entity->get('redirect')->value) {
// $row['redirect'] = Link::fromTextAndUrl($redirect_url, Url::fromUri($redirect_url));
// }
return $row + parent::buildRow($entity);
}