public function Add(ReportCommandBuilder $builder) { if ($this->groupBy == self::GROUP) { $builder->GroupByGroup(); } if ($this->groupBy == self::SCHEDULE) { $builder->GroupBySchedule(); } if ($this->groupBy == self::USER) { $builder->GroupByUser(); } if ($this->groupBy == self::RESOURCE) { $builder->GroupByResource(); } }