public function __construct(SiteModel $site = null, $timeZone = null)
 {
     parent::__construct($site, $timeZone);
     // We want all events
     // (... is default)
     // order by created at time
     $this->eventRepositoryBuilder->setOrderByCreatedAt(true);
 }
 public function build()
 {
     // We only want events in X days before now and onwards
     $time = \TimeSource::getDateTime();
     $time->add(new \DateInterval("P" . $this->daysBefore . "D"));
     $this->eventRepositoryBuilder->setBefore($time);
     parent::build();
 }
 public function __construct(SiteModel $site = null, $timeZone = null, $title = null)
 {
     parent::__construct($site, $timeZone, $title);
     // We go back a month, just so calendars have a bit of the past available.
     $time = \TimeSource::getDateTime();
     $time->sub(new \DateInterval("P30D"));
     $this->eventRepositoryBuilder->setAfter($time);
 }
 public function __construct(SiteModel $site = null, $timeZone = null)
 {
     parent::__construct($site, $timeZone);
     $this->eventRepositoryBuilder->setAfterNow();
 }