You are here

OpignoActivityTypeListBuilder.php in Opigno module 3.x

Same filename and directory in other branches
  1. 8 src/OpignoActivityTypeListBuilder.php

File

src/OpignoActivityTypeListBuilder.php
View source
<?php

namespace Drupal\opigno_module;

use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;

/**
 * Provides a listing of Activity type entities.
 */
class OpignoActivityTypeListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['label'] = $this
      ->t('Activity type');
    $header['id'] = $this
      ->t('Machine name');
    return $header + parent::buildHeader();
  }

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    $row['label'] = $entity
      ->label();
    $row['id'] = $entity
      ->id();
    return $row + parent::buildRow($entity);
  }

}

Classes

Namesort descending Description
OpignoActivityTypeListBuilder Provides a listing of Activity type entities.