You are here

public function DestinationListBuilder::buildRow in Backup and Migrate 8.4

Same name and namespace in other branches
  1. 5.0.x src/Controller/DestinationListBuilder.php \Drupal\backup_migrate\Controller\DestinationListBuilder::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/Controller/DestinationListBuilder.php, line 26

Class

DestinationListBuilder
Provides a listing of Backup Destination entities.

Namespace

Drupal\backup_migrate\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['label'] = $entity
    ->label();
  $row['id'] = $entity
    ->id();
  $row['type'] = $entity
    ->get('type');
  if ($plugin = $entity
    ->getPlugin()) {
    $info = $plugin
      ->getPluginDefinition();
    $row['type'] = $info['title'];
  }
  return $row + parent::buildRow($entity);
}