MollieProfileListBuilder.php in Mollie Payment 8.2
File
src/Entity/MollieProfile/MollieProfileListBuilder.php
View source
<?php
namespace Drupal\mollie_payment\Entity\MollieProfile;
use Drupal\Core\Entity\EntityListBuilder;
class MollieProfileListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Label');
$header['apiKey'] = $this
->t('API key');
return $header + parent::buildHeader();
}
public function buildRow(\Drupal\mollie_payment\Entity\MollieProfile $entity) {
$row['label'] = $this
->getLabel($entity);
$row['apiKey'] = $entity
->getApiKey();
return $row + parent::buildRow($entity);
}
public function render() {
$build = parent::render();
$build['#empty'] = $this
->t('There are no Mollie profiles configured yet.');
return $build;
}
}