GoogleApiServiceClientListBuilder.php in Google API PHP Client 8.3
File
src/Entity/Controller/GoogleApiServiceClientListBuilder.php
View source
<?php
namespace Drupal\google_api_client\Entity\Controller;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
class GoogleApiServiceClientListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header = [
'id' => $this
->t('Machine Name'),
'label' => $this
->t('Name'),
'services' => $this
->t('Services'),
];
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row = [
'id' => $entity
->id(),
'label' => $entity
->label(),
'services' => implode(', ', $entity
->getServices()),
];
return $row + parent::buildRow($entity);
}
}