You are here

public function WebhookListBuilder::buildRow in Webhooks 8

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

modules/webhook/src/WebhookListBuilder.php, line 90

Class

WebhookListBuilder
Provides a list controller for the webhook entity type.

Namespace

Drupal\webhook

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\webhook\WebhookInterface $entity */
  $row['id'] = $entity
    ->id();
  $row['title'] = $entity
    ->toLink();
  $row['created'] = $this->dateFormatter
    ->format($entity
    ->getCreatedTime());
  return $row + parent::buildRow($entity);
}