You are here

class MetadataInfoEventSubscriber in Filebrowser 8.2

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

Hierarchy

  • class \Drupal\filebrowser_extra\EventSubscriber\MetadataInfoEventSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of MetadataInfoEventSubscriber

1 string reference to 'MetadataInfoEventSubscriber'
filebrowser_extra.services.yml in modules/filebrowser_extra.services.yml
modules/filebrowser_extra.services.yml
1 service uses MetadataInfoEventSubscriber
filebrowser_modified.metadata_info in modules/filebrowser_extra.services.yml
Drupal\filebrowser_extra\EventSubscriber\MetadataInfoEventSubscriber

File

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

Namespace

Drupal\filebrowser_extra\EventSubscriber
View source
class MetadataInfoEventSubscriber implements EventSubscriberInterface {
  public static function getSubscribedEvents() {
    $events['filebrowser.metadata_info'][] = [
      'setInfo',
      0,
    ];
    return $events;
  }
  public function setInfo($event) {

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

}

Members

Namesort descending Modifiers Type Description Overrides
MetadataInfoEventSubscriber::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to.
MetadataInfoEventSubscriber::setInfo public function