FilebrowserListBuilder.php in Filebrowser 8
File
lib/Drupal/filebrowser/Entity/Controller/FilebrowserListBuilder.php
View source
<?php
namespace Drupal\filebrowser\Entity\Controller;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
class FilebrowserListBuilder extends EntityListBuilder {
public function buildHeader() {
$header['id'] = t('FooBarID');
$header['label'] = t('Label');
$header['filebrowser_field'] = t('FilebrowserField');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['id'] = $entity
->id();
$row['label'] = l($this
->getLabel($entity), 'filebrowser/' . $entity
->id());
$row['filebrowser_field'] = $entity
->getFilebrowserField();
return $row + parent::buildRow($entity);
}
}
Classes
Name |
Description |
FilebrowserListBuilder |
Provides a list controller for entity. Define header and row content for the FooBar listing. The 'Operations' links are added
automatically from the 'links' definition in the entityType annotation when the parent functions are called. |