You are here

public function QueryEntityListBuilder::buildRow in Lightweight Directory Access Protocol (LDAP) 8.3

Same name and namespace in other branches
  1. 8.4 ldap_query/src/QueryEntityListBuilder.php \Drupal\ldap_query\QueryEntityListBuilder::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

ldap_query/src/QueryEntityListBuilder.php, line 27

Class

QueryEntityListBuilder
Provides a listing of LDAP Queries entities.

Namespace

Drupal\ldap_query

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->label();
  $server = Server::load($entity
    ->get('server_id'));
  $row['server_id'] = $server
    ->label();
  $row['status'] = $entity
    ->get('status') ? $this
    ->t('Enabled') : $this
    ->t('Disabled');
  return $row + parent::buildRow($entity);
}