/**
  * @param CollectStylesheetsEvent $event
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public function collectStylesheets(CollectStylesheetsEvent $event)
 {
     /** @var EventDispatcher $eventDispatcher */
     $eventDispatcher = $GLOBALS['container']['event-dispatcher'];
     $database = \Database::getInstance();
     $theme = $database->query("SELECT * FROM tl_theme ORDER BY name");
     $stylesheets = $event->getStylesheets();
     while ($theme->next()) {
         $stylesheet = $database->prepare("SELECT * FROM tl_style_sheet WHERE pid=?")->execute($theme->id);
         while ($stylesheet->next()) {
             $stylesheets['contao:' . $stylesheet->name] = '<span style="color:#A6A6A6;display:inline">' . $theme->name . ': </span>' . $stylesheet->name . '<span style="color:#A6A6A6;display:inline">.css</span>';
         }
         $eventDispatcher->dispatch(AvisotaMessageEvents::COLLECT_THEME_STYLESHEETS, new CollectThemeStylesheetsEvent($theme->row(), $stylesheets));
     }
 }
 function __construct(array $theme, \ArrayObject $stylesheets)
 {
     $this->theme = $theme;
     parent::__construct($stylesheets);
 }