97a008ac09d13100993a6cdcbe7da5b00c42b7a6
2 namespace Civi\Api4\Generic\Traits
;
5 * This trait adds the $current param to a Get action.
7 * @see \Civi\Api4\Event\Subscriber\IsCurrentSubscriber
12 * Convenience filter for selecting items that are enabled and are currently within their start/end dates.
14 * Adding current = TRUE is a shortcut for
15 * WHERE is_active = 1 AND (end_date IS NULL OR end_date >= now) AND (start_date IS NULL OR start_DATE <= now)
17 * Adding current = FALSE is a shortcut for
18 * WHERE is_active = 0 OR start_date > now OR end_date < now
27 public function getCurrent() {
28 return $this->current
;
32 * @param bool $current
35 public function setCurrent($current) {
36 $this->current
= $current;