当前位置: 首页>>代码示例>>PHP>>正文


PHP Gpf_Rpc_Form::load方法代码示例

本文整理汇总了PHP中Gpf_Rpc_Form::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Gpf_Rpc_Form::load方法的具体用法?PHP Gpf_Rpc_Form::load怎么用?PHP Gpf_Rpc_Form::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gpf_Rpc_Form的用法示例。


在下文中一共展示了Gpf_Rpc_Form::load方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load

    /**
     * @service filter read
     * @param $fields
     */
    public function load(Gpf_Rpc_Params $params) {
        $form = new Gpf_Rpc_Form($params);

        $filter = new Gpf_Db_Filter();
        $filter->set('filterid', $form->getFieldValue("Id"));
        //TODO: check if filterid belongs to authUser
        try {
            $filter->load();
            $form->load($filter);
        } catch (Gpf_DbEngine_NoRow $e) {
            throw new Exception($this->_("Filter does not exist"));
        }
        return $form;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:18,代码来源:FilterForm.class.php

示例2: load

 /**
  * @service email_setting read
  * @param $fields
  */
 public function load(Gpf_Rpc_Params $params)
 {
     $form = new Gpf_Rpc_Form($params);
     $dbRow = new Gpf_Db_MailAccount();
     $dbRow->setAsDefault(true);
     try {
         $dbRow->loadFromData(array(Gpf_Db_Table_MailAccounts::IS_DEFAULT));
         $form->load($dbRow);
     } catch (Gpf_DbEngine_NoRow $e) {
         $form->setErrorMessage($this->getDbRowObjectName() . $this->_(" does not exist"));
         return $form;
     }
     return $form;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:18,代码来源:EmailSettingsForms.class.php

示例3: load

    /**
     * Load default currency
     *
     * @service currency read
     * @param $fields
     */
    public function load(Gpf_Rpc_Params $params) {
        $form = new Gpf_Rpc_Form($params);

        $row = $this->createDbRowObject();
        $row->setIsDefault(Gpf_Db_Currency::DEFAULT_CURRENCY_VALUE);

        try {
            $row->loadFromData();
            $form->load($row);
            Gpf_Plugins_Engine::extensionPoint('PostAffiliate.CurrencyForm.load', $form);
        } catch (Gpf_DbEngine_NoRowException $e) {
            throw new Exception($this->getDbRowObjectName().$this->_(" does not exist"));
        }

        return $form;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:22,代码来源:CurrencyForm.class.php

示例4: add

    /** 
     *
     * @service user_comm_group add
     * @param $fields
     */
    public function add(Gpf_Rpc_Params $params) {
        $form = new Gpf_Rpc_Form($params);     

        $dbRow = $this->createDbRowObject();
        $this->setDefaultDbRowObjectValues($dbRow);

        $form->fill($dbRow);
        $dbRow->set(Pap_Db_Table_UserInCommissionGroup::STATUS, self::DEFAULT_STATUS);
        $dbRow->set(Pap_Db_Table_UserInCommissionGroup::NOTE, self::DEFAULT_NOTE);
        $dbRow->set(Pap_Db_Table_UserInCommissionGroup::DATE_ADDED, Gpf_Common_DateUtils::now());

        try {
            $dbRow->save();
        } catch (Exception $e) {
            $form->setErrorMessage($e->getMessage());
            return $form;
        }

        $form->load($dbRow);
        $form->setField("Id", $dbRow->getPrimaryKeyValue());
        $form->setInfoMessage($this->getDbRowObjectName().$this->_(" added"));
        return $form;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:28,代码来源:UserInCommisonGroupsForm.class.php

示例5: add

    /** 
     *
     * @service user_in_commission_group add
     * @param $fields
     * @return Gpf_Rpc_Form
     */
    public function add(Gpf_Rpc_Params $params) {
        $form = new Gpf_Rpc_Form($params);

        $dbRow = $this->createDbRowObject();
        $this->setDefaultDbRowObjectValues($dbRow);

        $form->fill($dbRow);
        $dbRow->setDateAdded(Gpf_Common_DateUtils::getDateTime(time()));
        
        $dbRow->removeUserFromCampaignGroups($form->getFieldValue('campaignid'));
        
        try {
            $dbRow->save();
        } catch (Exception $e) {
            $form->setErrorMessage($e->getMessage());
            return $form;
        }

        $form->load($dbRow);
        $form->setField("Id", $dbRow->getPrimaryKeyValue());
        $form->setInfoMessage($this->_("%s was successfully added", $this->getDbRowObjectName()));
        
        return $form;
    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:30,代码来源:AffiliateGroupForm.class.php

示例6: loadForm

 protected function loadForm(Gpf_Rpc_Form $form, Gpf_DbEngine_RowBase $dbRow) {
     $form->load($dbRow);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:3,代码来源:FormService.class.php

示例7: loadFileInfo

 /**
  * Load information about file
  *
  * @service uploaded_file read
  * @param Gpf_Rpc_Params $parmas
  */
 public function loadFileInfo(Gpf_Rpc_Params $params)
 {
     $form = new Gpf_Rpc_Form($params);
     $dbRow = new Gpf_Db_File();
     $dbRow->setFileId($form->getFieldValue('fileid'));
     try {
         $dbRow->load();
         $form->load($dbRow);
     } catch (Gpf_Exception $e) {
         $form->setErrorMessage($this->_("Failed to load file info"));
     }
     return $form;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:19,代码来源:Download.class.php

示例8: fillForm

 public function fillForm(Gpf_Rpc_Form $form)
 {
     $form->load($this);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:4,代码来源:Impression.php

示例9: fillForm

    public function fillForm(Gpf_Rpc_Form $form) {
        $form->load($this);
        $this->fillIframeSize($form);

    }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:5,代码来源:Html.class.php


注:本文中的Gpf_Rpc_Form::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。