/**
  *
  * @service merchant write
  * @return Gpf_Rpc_Form
  */
 public function save(Gpf_Rpc_Params $params) {
     $form = parent::save($params);
     
     if ($form->existsField('WelcomeMessage')) {
         Gpf_Settings::set(Pap_Settings::WELCOME_MESSAGE, $form->getFieldValue("WelcomeMessage"));
     }
     return $form;
 }
 /**
  * @service currency delete
  * @param $ids
  * @return Gpf_Rpc_Action
  */
 public function deleteRows(Gpf_Rpc_Params $params) {
     return parent::deleteRows($params);
 }
 /**
  * @service country write
  *
  * @param $fields
  * @return Gpf_Rpc_Action
  */
 public function saveFields(Gpf_Rpc_Params $params)
 {
     return parent::saveFields($params);
 }
    /**
     * @service campaign add
     * @return Gpf_Rpc_Form
     */
    public function add(Gpf_Rpc_Params $params) {
        $form = parent::add($params);

        if ($form->isSuccessful()) {
            $this->insertDefaultCommissionTypes();
        }
        return $form;
    }
    /**
     * @service banners_categories write
     * @return Gpf_Rpc_Form
     */
    public function save(Gpf_Rpc_Params $params) {
        $form = new Gpf_Rpc_Form($params);

        $name = $form->getFieldValue('name');
        $state = $form->getFieldValue('state');

        $node = $this->getTreeNode($form->getFieldValue('Id'));
        $node->setName($name);
        $node->setState($state);
        $node->save();
        $form = parent::save($params);
        if ($form->getErrorMessage() != '') {
            $this->categoryCode = $form->getFieldValue('Id');
            $form = parent::add($params);
        }
        return $form;
    }
 /**
  * @service language read
  * @return Gpf_Rpc_Form
  */
 public function load(Gpf_Rpc_Params $params)
 {
     return parent::load($params);
 }
 /**
  * @service role delete
  * @return Gpf_Rpc_Action
  */
 public function deleteRows(Gpf_Rpc_Params $params)
 {
     $rpcAction = parent::deleteRows($params);
     Gpf_Plugins_Engine::extensionPoint('Gpf_Role_RoleForm.afterDeleteRows', $rpcAction);
     return $rpcAction;
 }
 /**
  * special handling - if password is empty, don't save it
  * 
  * @service myprofile read
  * @param $fields
  * @return Gpf_Rpc_Form
  */
 public function load(Gpf_Rpc_Params $params)
 {
     $form = parent::load($params);
     $form->setField('Id', $this->getId($form));
     return $form;
 }
 protected function updateRow(Gpf_Rpc_Form $form, Gpf_Db_MailTemplate $mailTemplate)
 {
     parent::updateRow($form, $mailTemplate);
 }
 /**
  * @service banner delete
  */
 public function deleteRows(Gpf_Rpc_Params $params) {
     $form = parent::deleteRows($params);
     try {
         $this->removeRotatorFromCache($this->getBannerIfFromAction('bannerrotatorid', $params));
     } catch (Gpf_Exception $e) {
         throw new Gpf_Exception("Warning: Problem with regeneration banners cache.");
     }
     return $form;
 }