public function MetadataInfoEventSubscriber::setInfo in Filebrowser 8.2
Same name in this branch
- 8.2 src/EventSubscriber/MetadataInfoEventSubscriber.php \Drupal\filebrowser\EventSubscriber\MetadataInfoEventSubscriber::setInfo()
- 8.2 modules/src/EventSubscriber/MetadataInfoEventSubscriber.php \Drupal\filebrowser_extra\EventSubscriber\MetadataInfoEventSubscriber::setInfo()
Same name and namespace in other branches
- 3.x src/EventSubscriber/MetadataInfoEventSubscriber.php \Drupal\filebrowser\EventSubscriber\MetadataInfoEventSubscriber::setInfo()
File
- src/
EventSubscriber/ MetadataInfoEventSubscriber.php, line 22
Class
Namespace
Drupal\filebrowser\EventSubscriberCode
public function setInfo($event) {
/** @var MetadataInfo $event */
$info = [
Common::ICON => [
'title' => $this
->t('Icon'),
],
Common::NAME => [
'title' => $this
->t('Name'),
'sortable' => TRUE,
'type' => 'string',
],
Common::CREATED => [
'title' => $this
->t('Created'),
//'sortable' => TRUE,
'type' => 'integer',
],
Common::SIZE => [
'title' => $this
->t('Size'),
// fixme: formatted size not sortable
'sortable' => false,
'type' => 'integer',
],
Common::MIME_TYPE => [
'title' => $this
->t('Mime type'),
'sortable' => TRUE,
'type' => 'string',
],
Common::DESCRIPTION => [
'title' => $this
->t('Description'),
'writable' => TRUE,
//'sortable' => TRUE,
'type' => 'string',
],
];
$event
->setMetaDataInfo($info);
}