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

getTimedRecords() private method

Set the QueryBuilder where parameters.
private getTimedRecords ( ContentRepository $contentRepo, string $type ) : Content[] | false
$contentRepo Bolt\Storage\Repository\ContentRepository
$type string
return Bolt\Storage\Entity\Content[] | false
    private function getTimedRecords(ContentRepository $contentRepo, $type)
    {
        /** @var QueryBuilder $query */
        $query = $contentRepo->createQueryBuilder('t')->andWhere('t.status = :status')->setParameter('currenttime', Carbon::now(), Type::DATETIME);
        if ($type === 'timed') {
            $this->getTimedPublishQuery($query);
        } elseif ($type === 'hold') {
            $this->getHoldQuery($query);
        } else {
            throw new StorageException(sprintf('Invalid type "%s" for timed record processing.', $type));
        }
        return $contentRepo->findWith($query) ?: [];
    }