本文整理匯總了PHP中app\Posts::getPostReserveButton方法的典型用法代碼示例。如果您正苦於以下問題:PHP Posts::getPostReserveButton方法的具體用法?PHP Posts::getPostReserveButton怎麽用?PHP Posts::getPostReserveButton使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Posts
的用法示例。
在下文中一共展示了Posts::getPostReserveButton方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
}
if (!empty($update['reserved_by'])) {
Posts::clearTransferAttempts($Post, $type, 'snatch');
} else {
if (!empty($Post->reserved_by)) {
Posts::clearTransferAttempts($Post, $type, 'free');
}
}
if ($type === 'request') {
$oldReserver = $Post->reserved_by;
$Post->__construct($update);
$response = [];
$suggested = isset($_POST['SUGGESTED']);
$fromProfile = isset($_POST['FROM_PROFILE']);
if ($suggested) {
$response['button'] = Posts::getPostReserveButton($Post, Users::get($Post->reserved_by), false);
} else {
if (!$fromProfile || $action !== 'unreserve') {
$response['li'] = Posts::getLi($Post);
}
}
if ($fromProfile || $suggested) {
$response['pendingReservations'] = Users::getPendingReservationsHTML($suggested ? $Post->reserved_by : $oldReserver, $suggested ? true : $isUserReserver);
}
Response::done($response);
} else {
Response::done();
}
} else {
if ($data === 'mass-approve') {
if (!Permission::sufficient('staff')) {