public function ProfileListBuilder::buildRow in Linkit 8.5
Same name and namespace in other branches
- 8.4 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 31
Class
- ProfileListBuilder
- Defines a class to build a listing of profile entities.
Namespace
Drupal\linkitCode
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);
}