reviews = new ArrayCollection(); $this->videos = new ArrayCollection(); $this->resources = new ArrayCollection(); } /** * @return string */ public function getName() { return $this->name; } /** * @return string */ public function getSlug() { return $this->slug; } /** * @return string */ public function getOverview() { return $this->overview; } /** * @return bool */ public function isActive() { return $this->is_active; } /** * @return Company */ public function getCompany() { return $this->company; } /** * @return Company */ public function getType() { return $this->type; } /** * @return int */ public function getCompanyId() { try { return !is_null($this->company)? $this->company->getId():0; } catch(\Exception $ex){ return 0; } } /** * @return int */ public function getTypeId() { try { return !is_null($this->type)? $this->type->getId():0; } catch(\Exception $ex){ return 0; } } /** * @return MarketPlaceReview[] */ public function getApprovedReviews(){ $criteria = Criteria::create(); $criteria->where(Criteria::expr()->eq('is_approved', true)); return $this->reviews->matching($criteria)->toArray(); } /** * @return string */ public function getCall2ActionUrl() { return $this->call_2_action_url; } /** * @return MarketPlaceReview[] */ public function getReviews() { return $this->reviews->toArray(); } /** * @return MarketPlaceVideo[] */ public function getVideos() { return $this->videos->toArray(); } /** * @return CompanyServiceResource[] */ public function getResources() { return $this->resources->toArray(); } }