You are here

public function MetadataInfoEventSubscriber::setInfo in Filebrowser 3.x

Same name in this branch
  1. 3.x src/EventSubscriber/MetadataInfoEventSubscriber.php \Drupal\filebrowser\EventSubscriber\MetadataInfoEventSubscriber::setInfo()
  2. 3.x modules/src/EventSubscriber/MetadataInfoEventSubscriber.php \Drupal\filebrowser_extra\EventSubscriber\MetadataInfoEventSubscriber::setInfo()
Same name and namespace in other branches
  1. 8.2 modules/src/EventSubscriber/MetadataInfoEventSubscriber.php \Drupal\filebrowser_extra\EventSubscriber\MetadataInfoEventSubscriber::setInfo()

File

modules/src/EventSubscriber/MetadataInfoEventSubscriber.php, line 15

Class

MetadataInfoEventSubscriber

Namespace

Drupal\filebrowser_extra\EventSubscriber

Code

public function setInfo($event) {

  /** @var MetadataInfo $event */
  $data = $event
    ->getMetaDataInfo();
  $data['modified'] = [
    'title' => t('Modified'),
    //'sortable' => TRUE,
    'type' => 'integer',
  ];
  $event
    ->setMetaDataInfo($data);
}