UserModuleStatusListBuilder.php in Opigno module 3.x
File
src/UserModuleStatusListBuilder.php
View source
<?php
namespace Drupal\opigno_module;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Link;
class UserModuleStatusListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['id'] = $this
->t('User module status ID');
$header['name'] = $this
->t('Name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity
->id();
$row['name'] = Link::createFromRoute($entity
->label(), 'entity.user_module_status.edit_form', [
'user_module_status' => $entity
->id(),
]);
return $row + parent::buildRow($entity);
}
}