/**
  * 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;
 }
Exemple #2
0
 /**
  * Renvoie les bâtiments sur lesquels il y a une construction ou une destruction à faire
  * @return BatimentCollection
  */
 public function getBatimentsAModifier()
 {
     return BatimentBusiness::getAModifierDePartie($this);
 }
Exemple #3
0
 /**
  * @return void
  */
 public function delete()
 {
     BatimentBusiness::delete($this);
 }
Exemple #4
0
 /**
  * @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();
 }