[Cartoweb-users] Using the selected object in the layer in my own
plugin
Eduard Witteveen
e.witteveen at HAWARIT.COM
Thu Oct 6 11:27:29 EDT 2005
Hello list,
Currently im trying to make my own ClientTestPlugin which extends
ClientPlugin and implements GuiProvider. In this plugin i want to use
the selected objects, which are stored inside the ClientTable.php.
The loop i want to do inside my ClientTestPlugin would be something like:
> $xml = "<gisdata>";
> foreach ($tableGroups->group as $group) {
> foreach ($tableGroup->tables as $table) {
> if($table->numRows > 0){
> $xml .= "<layer name=" . $table->tableTitle . ">";
> $xml .= "<meta>";
> if(!$table->noRowId) {
> $xml .= "<field index=\"true\" name=\"" . Id
> . " />";
> }
> foreach($table->columnTitles as $column) {
> $xml .= "<field>" . $column . "</field>";
> }
> $xml .= "</meta>";
>
> foreach($table->rows as $row) {
> $xml .= "<object>";
> if(!$table->noRowId) {
> $xml .= "<data>" . $row->rowId ."</data>";
> }
> foreach($row->cells as $value) {
> $xml .= "<data>" . $value . "</data>";
> }
> $xml .= "</object>";
> }
> $xml .= "</layer>";
> }
> }
> }
> $xml = "</gisdata>";
The problem is that i dont know how i should access this $tableGroups,
which is stored inside the ClientTables.php (private). I know that the
value is also assigned to Smarty under the key='tables', but i also dont
know how to access it.
Ofcourse i can hack-around and change the access-rights of the
core-plugin, but i'd rather dont do this.
PS: i want to select also polygons with this plugin, it would be nice if
i could use the same design pattern,...
More information about the Cartoweb-users
mailing list