[Cartoweb-users] Write a plugin

Alexandre Saunier alexandre.saunier at camptocamp.com
Wed May 31 06:30:53 EDT 2006


You don't need to make your extended plugin implement GuiProvider since 
the parent class (ClientEdit) already does. You should simply write:
class ClientlayersManagement extends ClientEdit {
     //...
}

I don't know if it's related (?) to your parse error problem.

Jacolin Yves wrote:
> My code for ClientLayersManagement is :
> <?php
> class ClientlayersManagement extends ClientEdit implements GuiProvider {
>    public function replacePlugin(){
>       return 'edit';
>    }
>     /**
>     * Constructor
>     */
>     public function __construct() {
>         $this->log =& LoggerManager::getLogger(__CLASS__);
>         parent::__construct();
>     }
>     public function handleHttpPostRequest($request) {
>          $test = $request['nameNewColunm1'];
>     }
>     public function handleHttpGetRequest($request) {}
> }
> ?>
> 
> And I get this error :
> "PHP Parse error:  parse error, unexpected T_STRING 
> in /var/www/html/cartoweb3/projects/script/plugins/layersManagement/client/ClientLayersManagement.php 
> on line 18"


More information about the Cartoweb-users mailing list