SolrFieldTypeListBuilder.php in Apache Solr Multilingual 8
File
src/Controller/SolrFieldTypeListBuilder.php
View source
<?php
namespace Drupal\apachesolr_multilingual\Controller;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class SolrFieldTypeListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = $this
->t('Solr Field Type');
$header['id'] = $this
->t('Machine name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $this
->getLabel($entity);
$row['id'] = $entity
->id();
return $row + parent::buildRow($entity);
}
public function load() {
$entity_ids = $this
->getEntityIds();
$entities = $this->storage
->loadMultipleOverrideFree($entity_ids);
uasort($entities, array(
$this->entityType
->getClass(),
'sort',
));
return $entities;
}
}