setOfferID($offerID); $this->handle(); } public function getRemoveAllowed() { return $this->removeAllowed; } private function setOfferID( $offerID ) { $this->offerID = $offerID; } private function handle() { $this->setProject(); $this->setRemoveAllowed(); } private function setProject() { $offer = Offer::Find($this->offerID); $this->project = is_null($offer->project_id) ? TRUE : FALSE; } private function setRemoveAllowed() { if( $this->project === FALSE ) return $this->removeAllowed = FALSE; $this->removeAllowed = TRUE; } }