ResponsiveImageStyleListBuilder.php in Zircon Profile 8.0
File
core/modules/responsive_image/src/ResponsiveImageStyleListBuilder.php
View source
<?php
namespace Drupal\responsive_image;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
class ResponsiveImageStyleListBuilder extends ConfigEntityListBuilder {
public function buildHeader() {
$header['label'] = t('Label');
$header['id'] = t('Machine name');
return $header + parent::buildHeader();
}
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['id'] = $entity
->id();
return $row + parent::buildRow($entity);
}
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
$operations['duplicate'] = array(
'title' => t('Duplicate'),
'weight' => 15,
'url' => $entity
->urlInfo('duplicate-form'),
);
return $operations;
}
}