Closed yndlingsfar closed 8 years ago
Hi @dsteiner23,
Have you tried to use Expression Language? http://symfony.com/doc/master/service_container/expression_language.html
It should be something like this:
link:
route_name: order_delivery
route_params:
id: "@=service('your_service').getMyValue()"
I hope it helps.
Thank you
I could solve the problem programmatically.
` $feed = $this->feedManager->get("atom")->addFromArray($view->getData()); $feed->set('link', [
'route_name' => 'order_delivery',
'route_params' => [
'id' => $order->getId()
]);
`
@dsteiner23 Great, thank you for your explanations!
Hi, is there any possibility to configure dynamic route_params? e.g. I have the following use case:
URL: /order/12345/delivery (where 12345 represents an unique order number) should return the following ATOM feed:
` <?xml version="1.0" encoding="utf-8"?>
`
The issue is, that in config.yml I can only configure static routing params, e.g
link: route_name: order_delivery route_params: id: xyz
And this would result in
<link href="/order/xyz/delivery" rel="self" type="application/rss+xml"/>
Please tell me, how can I inject the order number 12345 into the feed itself?
BR
Daniel