/** * Renvoie les Batiments liés aux Productions de cette collection * @return BatimentCollection */ public function getBatiments() { if (is_null($this->cacheBatiments)) { $this->cacheBatiments = BatimentBusiness::getFromProductions($this); $this->cacheBatiments->store(); } return $this->cacheBatiments; }
/** * Renvoie les bâtiments sur lesquels il y a une construction ou une destruction à faire * @return BatimentCollection */ public function getBatimentsAModifier() { return BatimentBusiness::getAModifierDePartie($this); }
/** * @return void */ public function delete() { BatimentBusiness::delete($this); }
/** * @param $type * @return Batiment */ public function getBatimentConstruitByType($type) { $batiments = BatimentBusiness::getByHexa($this, 0, $type); if (is_null($batiments) || $batiments->count() == 0) { return null; } return $batiments->getFirstElement(); }