ParagraphSetListBuilder.php in Paragraphs frontend ui 8
File
src/ParagraphSetListBuilder.php
View source
<?php
namespace Drupal\paragraphs_frontend_ui;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Link;
class ParagraphSetListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['id'] = $this
->t('Paragraph set 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.paragraph_set.edit_form', [
'paragraph_set' => $entity
->id(),
]);
return $row + parent::buildRow($entity);
}
}