You are here

public function AbrconfigListBuilder::buildRow in Access by Reference 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()

1 call to AbrconfigListBuilder::buildRow()
AbrconfigListBuilder::render in src/Controller/AbrconfigListBuilder.php
Builds the entity listing as renderable array for table.html.twig.

File

src/Controller/AbrconfigListBuilder.php, line 35

Class

AbrconfigListBuilder
Provides a listing of Example.

Namespace

Drupal\access_by_ref\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['id'] = $entity
    ->id();
  $row['label'] = $entity
    ->label();
  $row['bundle'] = $entity
    ->getBundle();
  $row['field'] = $entity
    ->getField();
  $row['reference_type'] = $entity
    ->getReferencetype(true);
  $row['extra'] = $entity
    ->getExtra();
  $row['rights_type'] = $entity
    ->getRightsType();
  $row['rights_read'] = $entity
    ->getRightsRead() == true ? 'X' : '';
  $row['rights_update'] = $entity
    ->getRightsUpdate() == true ? 'X' : '';
  $row['rights_delete'] = $entity
    ->getRightsDelete() == true ? 'X' : '';

  // You probably want a few more properties here...
  return $row + parent::buildRow($entity);
}