本文整理汇总了PHP中Rank::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::getName方法的具体用法?PHP Rank::getName怎么用?PHP Rank::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rank
的用法示例。
在下文中一共展示了Rank::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createEditPopup
/**
* Create edit popup
* @param Rank $p_oRank
* @return string Code HTML
*/
private function createEditPopup($p_oRank)
{
$oPopup = new View('popup');
$oPopup->addData('id', $p_oRank->getId());
$oPopup->addData('buttonstyle', 'btn-primary');
$oPopup->addData('buttonicon', 'fa-edit');
$oPopup->addData('buttontext', Language::translate('RANKS_ADMIN_EDIT_EDIT'));
$oPopup->addData('title', Language::translate('RANKS_ADMIN_EDIT_TITLE'));
$oFormEdit = new FormGenerator();
$oFormEdit->setAction('index.php?p=adminranks&edit=' . $p_oRank->getId());
$oFormEdit->addInput(Language::translate('RANKS_ADMIN_EDIT_NAME'), 'name', true, false, 'text', '', $p_oRank->getName());
$oFormEdit->addCheckbox(Language::translate('RANKS_ADMIN_EDIT_DEFAULT'), 'default', $p_oRank->isDefault());
$oFormEdit->addCheckbox(Language::translate('RANKS_ADMIN_EDIT_DEL'), 'delete');
$oFormEdit->create();
$oPopup->addData('content', $oFormEdit->getCode());
$oPopup->create();
return $oPopup->getCode();
}
示例2: extract
if ($do == 'create') {
extract($_POST);
Rank::create($name, $division, $abbrev, $paygrade);
Event::addEvent('Rank ' . $name . ' has been created.', $_SESSION['user'], 1);
}
}
} else {
if ($action == 'delete') {
if ($do == 'none') {
?>
<a onclick="load('ranks', 'delete', 'delete', {id: '<?php
echo $_GET['id'];
?>
'})">Continue?</a> (<b>NOTE:</b> This action cannot be reversed!)
<?php
} else {
if ($do == 'delete') {
$ranks = new Rank($_GET['id']);
$ranks->delete();
Event::addEvent('Rank ' . $ranks->getName() . ' has been deleted.', $_SESSION['user'], 3);
?>
<script>
load('ranks', 'none', 'none', {});
</script>
<?php
}
}
}
}
}
}