Merge pull request #435 from Yochima/yochima-branch

add argument id to the order_product loop
This commit is contained in:
Manuel Raynaud
2014-05-27 08:53:19 +02:00

View File

@@ -41,7 +41,8 @@ class OrderProduct extends BaseLoop implements PropelSearchLoopInterface
protected function getArgDefinitions()
{
return new ArgumentCollection(
Argument::createIntTypeArgument('order', null, true)
Argument::createIntTypeArgument('order', null, true),
Argument::createIntListTypeArgument('id')
);
}
@@ -58,6 +59,10 @@ class OrderProduct extends BaseLoop implements PropelSearchLoopInterface
$search->filterByOrderId($order, Criteria::EQUAL);
if (null !== $this->getId()) {
$search->filterById($this->getId(), Criteria::IN);
}
$search->orderById(Criteria::ASC);
return $search;