publishTimedRecords() public method

Check (and update) any records that need to be updated from "timed" to "published".
public publishTimedRecords ( )
Esempio n. 1
0
 /**
  * Kernel request listener callback.
  *
  * @param GetResponseEvent $event
  */
 public function onKernelRequest(GetResponseEvent $event)
 {
     if (!$event->isMasterRequest()) {
         return;
     }
     if ($this->isProfilerRequest($event->getRequest())) {
         return;
     }
     $this->schemaCheck($event);
     // Check if we need to 'publish' any 'timed' records, or 'hold' any expired records.
     if ($this->timedRecordsEnabled && $this->timedRecord->isDuePublish()) {
         $this->timedRecord->publishTimedRecords();
     }
     if ($this->timedRecordsEnabled && $this->timedRecord->isDueHold()) {
         $this->timedRecord->holdExpiredRecords();
     }
 }