/** * Kernel request listener callback. * * @param GetResponseEvent $event */ public function onKernelRequest(GetResponseEvent $event) { if (!$event->isMasterRequest()) { return; } $contenttypes = $this->config->get('contenttypes', array()); foreach ($contenttypes as $contenttype) { $contenttype = $this->storage->getContentType($contenttype['slug']); // Check if we need to 'publish' any 'timed' records, or 'depublish' any expired records. $this->storage->publishTimedRecords($contenttype); $this->storage->depublishExpiredRecords($contenttype); } }