You are here

public function MandrillTemplateMapListBuilder::buildRow in Mandrill 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/mandrill_template/src/Controller/MandrillTemplateMapListBuilder.php, line 35
Contains \Drupal\mandrill_template\Controller\MandrillTemplateMapListBuilder.

Class

MandrillTemplateMapListBuilder
Provides a listing of MandrillTemplateMap entities.

Namespace

Drupal\mandrill_template\Controller

Code

public function buildRow(EntityInterface $entity) {

  /* @var $entity \Drupal\mandrill_template\Entity\MandrillTemplateMap */
  $row['label'] = $entity
    ->label() . ' (Machine name: ' . $entity
    ->id() . ')';
  $row['template_id'] = $entity->template_id;
  $row['main_section'] = $entity->main_section;
  $row['mailsystem_key'] = $entity->mailsystem_key;
  return $row + parent::buildRow($entity);
}