Пример #1
0
 public static function getIngredientList($session)
 {
     $ingredient = new IngredientCollection();
     $ingredient->addFilter("name LIKE '%" . $session['query'] . "%'");
     $ingredient->load();
     return $ingredient->export();
 }
Пример #2
0
 public function getPrice()
 {
     $ingredientList = new IngredientCollection();
     $ingredientList->loadByCocktail($this->getId());
     if ($this->isTopTen()) {
         $multiplier = 5;
     } else {
         if ($this->isFlopTen()) {
             $multiplier = 3;
         } else {
             $multiplier = 1;
         }
     }
     return $ingredientList->getPrice($multiplier);
 }