public function getIngredients()
 {
     $ingredients = array();
     foreach ($this->getData()['index'] as $index) {
         $ingredients[] = IngredientDAO::getById($index);
     }
     return $ingredients;
 }
<?php

if (!isset($_GET['id'])) {
    $request->redirect('all');
}
$presenter->data['ingredient'] = IngredientDAO::getById(urldecode(@$_GET['id']));