You are here

public function GoogleApiServiceClientListBuilder::buildRow in Google API PHP Client 8.4

Same name and namespace in other branches
  1. 8.3 src/Entity/Controller/GoogleApiServiceClientListBuilder.php \Drupal\google_api_client\Entity\Controller\GoogleApiServiceClientListBuilder::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/Entity/Controller/GoogleApiServiceClientListBuilder.php, line 35

Class

GoogleApiServiceClientListBuilder
Provides a list controller for google_api_client entity.

Namespace

Drupal\google_api_client\Entity\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row = [
    'id' => $entity
      ->id(),
    'label' => $entity
      ->label(),
    'services' => implode(', ', $entity
      ->getServices()),
  ];
  return $row + parent::buildRow($entity);
}