本文整理汇总了PHP中Rank::store方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::store方法的具体用法?PHP Rank::store怎么用?PHP Rank::store使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rank
的用法示例。
在下文中一共展示了Rank::store方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: procede
public function procede()
{
try {
if ($this->oRequest->existParam('name')) {
if ($this->oRequest->existParam('edit')) {
$oRank = new Rank($this->oRequest->getParam('name', 'string'), $this->oRequest->getParam('default', 'boolean'), $this->oRequest->getParam('edit', 'int'));
//Delete
if ($this->oRequest->existParam('delete') && $this->oRequest->getParam('delete', 'boolean')) {
$oRank->delete();
Logger::log('admin', Language::translate('RANKS_ADMIN_RANK_DELLOG') . $this->oRequest->getParam('name', 'string') . ' [' . $this->oCurrentUser->getLogin() . ']');
$this->oView->addAlert(Language::translate('RANKS_ADMIN_RANK_DEL'), 'success');
} else {
//Edit
$oRank->update();
Logger::log('admin', Language::translate('RANKS_ADMIN_RANK_UPDATELOG') . $this->oRequest->getParam('name', 'string') . ' [' . $this->oCurrentUser->getLogin() . ']');
$this->oView->addAlert(Language::translate('RANKS_ADMIN_RANK_UPDATE'), 'success');
}
} else {
$oRank = new Rank($this->oRequest->getParam('name', 'string'), $this->oRequest->getParam('default', 'boolean'));
$oRank->store();
Logger::log('admin', Language::translate('RANKS_ADMIN_RANK_ADDLOG') . $this->oRequest->getParam('name', 'string') . ' [' . $this->oCurrentUser->getLogin() . ']');
$this->oView->addAlert(Language::translate('RANKS_ADMIN_RANK_ADD'), 'success');
}
}
} catch (Exception $ex) {
$this->oView->addAlert($ex, 'danger');
} finally {
$this->createView();
}
}