本文整理汇总了PHP中SPLang::saveValues方法的典型用法代码示例。如果您正苦于以下问题:PHP SPLang::saveValues方法的具体用法?PHP SPLang::saveValues怎么用?PHP SPLang::saveValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPLang
的用法示例。
在下文中一共展示了SPLang::saveValues方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save(&$attr)
{
$data = array('key' => $this->nid . '-viewInfo', 'value' => $attr['viewInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
SPLang::saveValues($data);
$data = array('key' => $this->nid . '-entryInfo', 'value' => $attr['entryInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
SPLang::saveValues($data);
$attr['required'] = 0;
$attr['fee'] = 0;
$attr['isFree'] = 1;
parent::save($attr);
}
示例2: save
protected function save()
{
if (!SPFactory::mainframe()->checkToken()) {
Sobi::Error('Token', SPLang::e('UNAUTHORIZED_ACCESS_TASK', SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
}
$data = SPRequest::string('bankdata', null, true);
$data = array('key' => 'bankdata', 'value' => $data, 'type' => 'application', 'id' => Sobi::Section(), 'section' => Sobi::Section());
try {
SPLang::saveValues($data);
} catch (SPException $x) {
$message = SPLang::e('DB_REPORTS_ERR', $x->getMessage());
Sobi::Error('SPPaymentBt', $message, SPC::WARNING, 0, __LINE__, __FILE__);
$this->response(Sobi::Back(), $message, false, 'error');
}
$this->response(Sobi::Back(), Sobi::Txt('MSG.ALL_CHANGES_SAVED'), false, 'success');
}
示例3: saveAttr
/**
* @param $attr
* @return mixed
* @throws SPException
*/
protected function saveAttr(&$attr)
{
if ($this->nid) {
$this->nid = $attr['nid'];
}
if (!isset($attr['viewInfo'])) {
$attr['viewInfo'] = $this->viewInfo;
$attr['entryInfo'] = $this->entryInfo;
}
$data = array('key' => $this->nid . '-viewInfo', 'value' => $attr['viewInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
SPLang::saveValues($data);
$data = array('key' => $this->nid . '-entryInfo', 'value' => $attr['entryInfo'], 'type' => 'field_information', 'fid' => $this->fid, 'id' => Sobi::Section(), 'section' => Sobi::Section());
SPLang::saveValues($data);
$attr['required'] = 0;
$attr['fee'] = 0;
$attr['isFree'] = 1;
return $attr;
}
示例4: save
protected function save()
{
if (!SPFactory::mainframe()->checkToken()) {
Sobi::Error('Token', SPLang::e('UNAUTHORIZED_ACCESS_TASK', SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
}
$this->validate('extensions.paypal', array('task' => 'paypal', 'pid' => Sobi::Section()));
SPFactory::registry()->saveDBSection(array(array('key' => 'ppurl', 'value' => SPRequest::string('ppurl')), array('key' => 'ppemail', 'value' => SPRequest::string('ppemail')), array('key' => 'ppcc', 'value' => SPRequest::string('ppcc')), array('key' => 'pprurl', 'value' => SPRequest::string('pprurl'))), 'paypal_' . Sobi::Section());
$data = array('key' => 'ppexpl', 'value' => SPRequest::string('ppexpl', null, true), 'type' => 'application', 'id' => Sobi::Section(), 'section' => Sobi::Section());
try {
SPLang::saveValues($data);
$data['key'] = 'ppsubject';
$data['value'] = SPRequest::string('ppsubject', true);
SPLang::saveValues($data);
} catch (SPException $x) {
$message = SPLang::e('DB_REPORTS_ERR', $x->getMessage());
Sobi::Error('SPPaymentBt', $message, SPC::WARNING, 0, __LINE__, __FILE__);
$this->response(Sobi::Back(), $message, false, 'error');
}
$this->response(Sobi::Back(), Sobi::Txt('MSG.ALL_CHANGES_SAVED'), false, 'success');
}
示例5: saveRejectionTpl
protected function saveRejectionTpl()
{
if (!SPFactory::mainframe()->checkToken()) {
Sobi::Error('Token', SPLang::e('UNAUTHORIZED_ACCESS_TASK', SPRequest::task()), SPC::ERROR, 403, __LINE__, __FILE__);
}
$templates = $this->getRejectionsTemplates();
$id = SPLang::nid(SPRequest::string('templateName'));
$templates[$id] = array('params' => SPConfig::serialize(array('trigger.unpublish' => SPRequest::bool('trigger_unpublish'), 'trigger.unapprove' => SPRequest::bool('trigger_unapprove'), 'unpublish' => SPRequest::bool('unpublish'), 'discard' => SPRequest::bool('discard'))), 'key' => $id, 'value' => SPRequest::string('templateName'), 'options' => array());
foreach ($templates as $tid => $template) {
unset($templates[$tid]['description']);
}
SPFactory::registry()->saveDBSection($templates, 'rejections-templates_' . Sobi::Section());
$data = array('key' => $id, 'value' => SPRequest::string('reason', null, true, 'post'), 'type' => 'rejections-templates', 'id' => Sobi::Section(), 'section' => Sobi::Section(), 'options' => SPRequest::string('templateName'));
SPLang::saveValues($data);
$this->response(Sobi::Back(), Sobi::Txt('ENTRY_REJECT_SAVED_TPL'), false, SPC::SUCCESS_MSG);
}