本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例6: loadForm
protected function loadForm(Gpf_Rpc_Form $form, Gpf_DbEngine_RowBase $dbRow) {
$form->load($dbRow);
}
示例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;
}
示例8: fillForm
public function fillForm(Gpf_Rpc_Form $form)
{
$form->load($this);
}
示例9: fillForm
public function fillForm(Gpf_Rpc_Form $form) {
$form->load($this);
$this->fillIframeSize($form);
}