Search

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.

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.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details