Recettes : on affiche toujours...

This commit is contained in:
2021-05-04 16:43:31 +02:00
parent a3dcbe7739
commit 2402e699fa
6 changed files with 60 additions and 15 deletions

View File

@@ -39,7 +39,8 @@ class ProductsLoop extends BaseLoop implements PropelSearchLoopInterface
->set("RECIPE_ID", $product->getRecipeId())
->set("PSE_ID", $product->getPseId())
->set("PRODUCT_LABEL", $productLabel)
->set("QUANTITY", $product->getQuantity())
->set("QUANTITY_NEEDED", $product->getQuantity())
->set("QUANTITY_PROPOSED", $product->getNbOfProducts())
;
$loopResult->addRow($loopResultRow);
}

View File

@@ -31,9 +31,9 @@ class StepsLoop extends BaseLoop implements PropelSearchLoopInterface
$loopResultRow = new LoopResultRow($step);
$loopResultRow
->set("RECIPE_ID", $step->getId())
->set("STEP", $step->getContentId())
->set("DESCRIPTION", $step->getTitle())
->set("RECIPE_ID", $step->getRecipeId())
->set("STEP", $step->getStep())
->set("DESCRIPTION", $step->getDescription())
;
$loopResult->addRow($loopResultRow);
}
@@ -58,8 +58,9 @@ class StepsLoop extends BaseLoop implements PropelSearchLoopInterface
$steps = RecipeStepsQuery::create();
if (null != $id = $this->getRecipeId()) {
$steps->filterById($id);
$steps->filterByRecipeId($id);
}
$steps->orderByStep();
return $steps;
}