You are here

ScriptListBuilder.php in Script Manager 8

File

src/ScriptListBuilder.php
View source
<?php

namespace Drupal\script_manager;

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

/**
 * A list builder for scripts.
 */
class ScriptListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    return [
      'label' => $this
        ->t('Name'),
    ] + parent::buildHeader();
  }

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

}

Classes

Namesort descending Description
ScriptListBuilder A list builder for scripts.