FilterGroup = $filterGroup; $this->Dependencies = []; $this->Filter = null; } /** * @param $dependency Dependency */ public function HasDependency($dependency) { foreach($this->Dependencies as $currentDependency) { if($currentDependency->Id == $dependency->Id) return true; } return false; } }