本文整理匯總了PHP中Board::setBoardLocked方法的典型用法代碼示例。如果您正苦於以下問題:PHP Board::setBoardLocked方法的具體用法?PHP Board::setBoardLocked怎麽用?PHP Board::setBoardLocked使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Board
的用法示例。
在下文中一共展示了Board::setBoardLocked方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: StaffPermission
if ($BOARD['required_permission_id'] != null) {
$permission = new StaffPermission($db);
$permission = $permission->findOneByStaffPermissionId($BOARD['required_permission_id']);
if ($permission == null) {
$ERRORS[] = 'Invalid permission specified.';
} else {
$permission_id = $permission->getStaffPermissionId();
}
}
// end perm specified; check it
if (sizeof($ERRORS) > 0) {
draw_errors($ERRORS);
} else {
$board->setBoardName($BOARD['name']);
$board->setBoardDescr($BOARD['description']);
$board->setBoardLocked($BOARD['locked']);
$board->setNewsSource($BOARD['news_source']);
$board->setOrderBy($BOARD['order_by']);
$board->setRequiredPermissionId($permission_id);
$board->setBoardCategoryId($category->getBoardCategoryId());
$board->save();
$_SESSION['board_notice'] = "You have saved <strong>{$board->getBoardName()}</strong>.";
redirect('admin-boards');
}
// end no errors
break;
// end save
}
// end state switch
}
// end no errors