public function __construct($name, DateRange $dateRange) { $this->form = new Form($name); $this->dateRange = $dateRange; $this->build(); }