public function MediaWatermarkListBuilder::buildRow in Media watermark 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
- src/
Controller/ MediaWatermarkListBuilder.php, line 32
Class
- MediaWatermarkListBuilder
- Provides a listing of Example.
Namespace
Drupal\media_watermark\ControllerCode
public function buildRow(EntityInterface $entity) {
$row['label'] = Html::escape($entity
->label($entity));
$row['id'] = Html::escape($entity
->id());
$row['fid'] = $this
->prepareImage($entity
->getFid());
$row['horizontalPosition'] = Html::escape($entity
->getHorizontalPosition());
$row['verticalPosition'] = Html::escape($entity
->getVerticalPosition());
$row['horizontalMargin'] = Html::escape($entity
->getHorizontalMargin());
$row['verticalMargin'] = Html::escape($entity
->getVerticalMargin());
// You probably want a few more properties here...
return $row + parent::buildRow($entity);
}