You are here

public function ProfileListBuilder::buildRow in Linkit 8.4

Same name and namespace in other branches
  1. 8.5 src/ProfileListBuilder.php \Drupal\linkit\ProfileListBuilder::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/ProfileListBuilder.php, line 36
Contains \Drupal\linkit\ProfileListBuilder.

Class

ProfileListBuilder
Defines a class to build a listing of profile entities.

Namespace

Drupal\linkit

Code

public function buildRow(EntityInterface $entity) {

  /** @var \Drupal\linkit\ProfileInterface $linkitProfile */
  $linkitProfile = $entity;
  $row['label'] = $linkitProfile
    ->label();
  $row['description']['data'] = [
    '#markup' => $linkitProfile
      ->getDescription(),
  ];
  return $row + parent::buildRow($entity);
}