Este listener calcula lastmodified de la ruta

@param ContentEvent $event
@return bool
323805
public function onCssLastModified(ContentEvent $event)
    {
        // @TODO lastmodified files from themeBundle templates
        $reflection = new \ReflectionClass(get_class($this));
        // @TODO
        if(strpos($reflection->getFileName(), '/cache/')) {
            $dir = dirname($reflection->getFileName()) . '/../../..';
        } else {
            $dir = dirname($reflection->getFileName()) . '/../../../../../..';
        }

        if(get_class($this) != "eDemy\MainBundle\Controller\MainController") {
        }


        $finder = new Finder();
        // @TODO
        $finder
            ->files()
            ->in($dir . '/vendor/edemy/mainbundle/eDemy/*/Resources/views/assets')
            ->name('*.css.twig')
            ->sortByModifiedTime();

        foreach ($finder as $file) {
            //$lastmodified = new \DateTime();
            $lastmodified = \DateTime::createFromFormat( 'U', $file->getMTime() );
            //$formattedString = $currentTime->format( 'c' );
            if($event->getLastModified() > $lastmodified) {
                //$event->setLastModified($lastmodified);
            } else {
                $event->setLastModified($lastmodified);
            }
        }
    }
406782
public function lastModified()
    {
        return $this->lastMod == 0?$this->lastMod = $this->getVariables()->getValue("last_modified"):$this->lastMod;
    }
563016
private function isSkippableEvent(Event $event)
    {
        if (!$this->firstBackgroundEnded) {
            return false;
        }

        return $event instanceof BackgroundTested || $this->isNonFailingConsequentBackgroundStep($event);
    }
1005468
private function shouldHandle($event)
    {
        if ($event instanceof TransactionalEvent) {
            return true;
        }

        $event = is_string($event) ? $event : get_class($event);

        foreach ($this->excluded as $excluded) {
            if ($this->matches($excluded, $event)) {
                return false;
            }
        }

        foreach ($this->transactional as $transactionalEvent) {
            if ($this->matches($transactionalEvent, $event)) {
                return true;
            }
        }

        return false;
    }
1149711
public function onReadAtChanged($event)
    {
        $sender = $event->sender;
        /* @var $sender static */
        $raAttribute = $sender->readAtAttribute;
        if (!is_string($raAttribute) || empty($raAttribute)) {
            return;
        }
        $reaAttribute = $sender->receivedAtAttribute;
        if (is_string($reaAttribute) && !$sender->isInitDatetime($sender->$raAttribute) && $sender->isInitDatetime($sender->$reaAttribute)) {
            $sender->$reaAttribute = $sender->currentDatetime();
        }
        // If it is permitted to change read time, it will return directly.
        if ($sender->permitChangeReadAt) {
            return;
        }
        $oldRa = $sender->getOldAttribute($raAttribute);
        if ($oldRa != null && !$sender->isInitDatetime($oldRa) && $sender->$raAttribute != $oldRa) {
            $sender->$raAttribute = $oldRa;
        }
    }
411662
public function preRender(Event $event)
    {
        $markdown = $event->getParam('markdown');

        $markdownHash = md5($markdown);

        $success = false;
        $renderedMarkdown = $this->cache->getItem($markdownHash, $success);
        if ($success) {
            $event->stopPropagation(true);

            return $renderedMarkdown;
        }

        return false;
    }
97617
@Override
    public boolean process(ContentEvent event) {

        ResultContentEvent inEvent = (ResultContentEvent) event;
        double[] prediction = inEvent.getClassVotes();
        int instanceIndex = (int) inEvent.getInstanceIndex();
        
        addStatisticsForInstanceReceived(instanceIndex, inEvent.getClassifierIndex(), prediction, 1);
        //Boosting
        addPredictions(instanceIndex, inEvent, prediction);              
               
        if (inEvent.isLastEvent() || hasAllVotesArrivedInstance(instanceIndex)) {
            DoubleVector combinedVote = this.mapVotesforInstanceReceived.get(instanceIndex);
            if (combinedVote == null){
                combinedVote = new DoubleVector();
            }
            ResultContentEvent outContentEvent = new ResultContentEvent(inEvent.getInstanceIndex(),
                    inEvent.getInstance(), inEvent.getClassId(),
                    combinedVote.getArrayCopy(), inEvent.isLastEvent());
            outContentEvent.setEvaluationIndex(inEvent.getEvaluationIndex());
            outputStream.put(outContentEvent);
            clearStatisticsInstance(instanceIndex);
            //Boosting
            computeBoosting(inEvent, instanceIndex);
            return true;
        }
        return false;

    }
337902
public function lastEvent(): Event
    {
        if ($count = count($this->calls)) {
            return $this->calls[$count - 1];
        }

        throw new UndefinedEventException(0);
    }
182054
public function listenToMethodNotFound($event)
    {
        if ('getServiceContainer' == $event['method']) {
            $event->setReturnValue($this->containerManager->getServiceContainer());
            return true;
        }

        if ('getContainerBuilder' == $event['method']) {
            $event->setReturnValue($this->containerManager->getContainerBuilder());
            return true;
        }

        if ('getService' == $event['method']) {
            $event->setReturnValue($this->containerManager->getServiceContainer()->get($event['arguments'][0]));
            return true;
        }

        return false;
    }
688679
public function receive(Event $event) : bool
    {
        if ($this->minimunLevel &&
            array_search($event->getLevel(), self::LOGLEVEL) < $this->minimunLevel) {
            return false;
        }

        return $this->send($event);
    }
1095624
public static function isSupportedEvent(string $event): bool
    {
        if ($ets = self::$allowedEvents) {
            return \in_array($event, $ets, true);
        }

        return true;
    }
774332
public function countListeners($event)
    {
        if ($event instanceof EventInterface) {
            $event = $event->getName();
        }

        return isset($this->listeners[$event]) ? count($this->listeners[$event]) : 0;
    }
152261
protected function resolveAttributeGetter($event)
    {
        foreach ($this->getAuditEvents() as $key => $value) {
            $auditableEvent = is_int($key) ? $value : $key;

            $auditableEventRegex = sprintf('/%s/', preg_replace('/\*+/', '.*', $auditableEvent));

            if (preg_match($auditableEventRegex, $event)) {
                return is_int($key) ? sprintf('get%sEventAttributes', ucfirst($event)) : $value;
            }
        }
    }
642461
public static function isSupportedEvent(string $event): bool
    {
        if (!$event || !preg_match('/[a-zA-z][\w-]+/', $event)) {
            return false;
        }

        if ($ets = self::$supportedEvents) {
            return \in_array($event, $ets, true);
        }

        return true;
    }
1247821
public function handleGetContentElement(GetContentElementEvent $event)
    {
        /** @var Controller $controllerAdapter */
        $controllerAdapter = $this->framework->getAdapter(Controller::class);

        $contentElement = $controllerAdapter->getContentElement(
            $event->getContentElementId(),
            $event->getColumn()
        );

        $event->setContentElementHtml($contentElement);
    }
81418
public function canTrigger(Event $event)
    {
        $if = $this->_evaluateCondition('if', $event);
        $unless = $this->_evaluateCondition('unless', $event);

        return $if && !$unless;
    }
685876
public static function preHooks(Event $event): bool
    {

        $directory = self::getProjectDir($event);
        $io        = $event->getIO();
        $removed   = false;

        foreach (self::$hooks as $hookName) {
            $hook = sprintf(
                '%1$s.git%3$shooks%3$s%2$s',
                $directory,
                $hookName,
                DIRECTORY_SEPARATOR
            );

            if (file_exists($hook)) {
                unlink($hook);
                $removed = true;
            }
        }

        if ($removed) {
            $io->write('<info>Hooks removed!</info>');
        }

        return true;
    }