本文整理匯總了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
}
}
}
}
}
}