public function NumberOfStagesWithStops() { if (Stage::get()) { $stage = ProcessStage::get()->filter("ParentID", $this->ID)->Count(); $stop = ProcessStopStage::get()->filter("ParentID", $this->ID)->Count(); return $stage + $stop; } else { return 0; } }
public function ProcessStages() { return ProcessStage::get()->filter('ParentID', $this->ProcessID); }