Extension DataSource doesn't have access to $param_pool?
This is an open discussion with 4 replies, filed under Extensions.
Search
Probably your datasource gets executed before any other datasource that outputs parameters. The quickest way to test this is to add $this->_dependencies = array('$ds-another-datasource');
in the __construct()
method.
It could be that your data-source is running first, so there would be nothing in the param pool. In order to have data in the param pool you would have to set the dependencies in the construct, otherwise you are not guaranteed that your data-source will execute last.
$this->_dependencies = array('$ds-dependency');
Also worth saying that $param_pool
is just DS output parameters, not everything else that you see in <params>...</params>
in the page XML. To get at this stuff, try something like:
$this->_env
In future Symphony versions (2.3?) there will be a cleaner way to access this.
That's nickdunn. Thats is where I am going wrong!
Create an account or sign in to comment.
Hi,
I am writing a datasource for my extension, but when I vardump the $parampool inside the grab function it is an empty array.
How can I get access to the $param_pool? Have a missed something obvious?
Thanks in advance.