3 namespace Drupal\paragraphs\Controller;
5 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
6 use Drupal\Core\Entity\EntityInterface;
9 * Provides a listing of ParagraphsType.
11 class ParagraphsTypeListBuilder extends ConfigEntityListBuilder {
16 public function buildHeader() {
17 $header['label'] = $this->t('Paragraphs types');
18 $header['id'] = $this->t('Machine name');
19 return $header + parent::buildHeader();
25 public function buildRow(EntityInterface $entity) {
26 $row['label'] = $entity->label();
27 $row['id'] = $entity->id();
28 // You probably want a few more properties here...
29 return $row + parent::buildRow($entity);
35 public function getDefaultOperations(EntityInterface $entity) {
36 /** @var \Drupal\field\FieldConfigInterface $entity */
37 $operations = parent::getDefaultOperations($entity);
39 if (isset($operations['edit'])) {
40 $operations['edit']['weight'] = 30;