Bolt\Storage\EventProcessor\TimedRecord::publishTimedRecords PHP Method

publishTimedRecords() public method

Check (and update) any records that need to be updated from "timed" to "published".
public publishTimedRecords ( )
    public function publishTimedRecords()
    {
        foreach ($this->contentTypeNames as $contentTypeName) {
            $this->timedHandleRecords($contentTypeName, 'timed');
        }
        $this->cache->save(self::CACHE_KEY_PUBLISH, true, $this->interval);
    }

Usage Example

Beispiel #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();
     }
 }