getResultDataCollection() as $recipe) { $loopResultRow = new LoopResultRow($recipe); $loopResultRow ->set("ID", $recipe->getId()) ->set("CONTENT_ID", $recipe->getContentId()) ->set("TITLE", $recipe->getTitle()) ->set("SUMMARY", $recipe->getSummary()) ->set("PEOPLE", $recipe->getPeople()) ->set("DIFFICULTY", $recipe->getDifficulty()) ->set("PREPARATION_TIME", $recipe->getPreparationTime()) ->set("COOKING_TIME", $recipe->getCookingTime()) ->set("OTHER_INGREDIENTS", $recipe->getOtherIngredients()) ; $loopResult->addRow($loopResultRow); } return $loopResult; } /** * @inheritdoc */ protected function getArgDefinitions() { return new ArgumentCollection( Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('content_id') ); } /** * @inheritdoc */ public function buildModelCriteria() { $recipes = RecipeQuery::create(); /* Filtrages éventuels */ if (null != $id = $this->getId()) { $recipes->filterById($id); } if (null != $contentId = $this->getContentId()) { $recipes->filterByContentId($contentId); } return $recipes; } }