[Cartoweb-users] TableRules and $inputvalues
Giorgio Plazzotta
plazzotta at tiscalinet.it
Mon Apr 17 17:27:46 EDT 2006
Hello
i am trying to implement the very simple and easy testMainTableRules
provided in the test_main project inside another project. It seems to be
very simple copying the plugin inside the plugin folder of the new project
and adding the reference of this plugin in the client.ini configuration
files.
Editing the clienttestmaintablerules.php its easy to understand that in the
$registry->addColumnAdder('query', 'POLYGON',
new ColumnPosition(ColumnPosition::TYPE_ABSOLUTE, -1),
array('url'), array('FID'),
array($this, 'computeQueryUrl'));
we can create a rule for any layer of out project changing the name of the
layer (ex. polygon) using also wildcards.
But in the
public function computeQueryUrl($tableId, $inputValues) {
if (!empty($inputValues['FID'])) {
$url = sprintf('<a href="%s%d" target="_blank">%s</a>',
'http://some/base/url?id=',
$inputValues['cod_loc'],
I18n::gt('More'));
}
return array('url' => $url);
}
i always get an error message of UNDEFINED INDEX on that field and this
applies also if i try to change field.
It seems that the $inputValues variable is not returning the content of the
field
and also if i just use the statement
$url = $inputValues['FID'];
I get the error
any help?
Giorgio
More information about the Cartoweb-users
mailing list