本文整理匯總了PHP中UserController::edit方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserController::edit方法的具體用法?PHP UserController::edit怎麽用?PHP UserController::edit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserController
的用法示例。
在下文中一共展示了UserController::edit方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: function
UserController::logout();
});
$routes->get('/logout/', function () {
UserController::logout();
});
$routes->get('/register/', function () {
UserController::register();
});
$routes->post('/register/', function () {
UserController::handle_register();
});
$routes->post('/user/:user_id/delete', function ($item_id) {
UserController::destroy($item_id);
});
$routes->get('/user/:user_id/edit', function ($user_id) {
UserController::edit($user_id);
});
$routes->post('/user/:user_id/edit', function ($user_id) {
UserController::update($user_id);
});
// Vaatteen esittelysivu
$routes->get('/user/:item_id', function ($user_id) {
UserController::show($user_id);
});
// Vaatteet
// Vaatteiden indeksisivu
$routes->get('/items/', function () {
ItemController::index();
});
// Vaatteen lisäyssivu
$routes->get('/items/new', function () {
示例2: function
UserController::create();
});
$routes->post('/signup', function () {
UserController::store();
});
$routes->get('/user', function () {
UserController::index();
});
$routes->get('/user/:id', function ($id) {
UserController::show($id);
});
$routes->post('/user/:id', function ($id) {
UserController::update($id);
});
$routes->get('/user/:id/edit', function ($id) {
UserController::edit($id);
});
$routes->get('/user/:id/destroy', function ($id) {
UserController::destroy($id);
});
$routes->get('/group', function () {
GroupController::index();
});
$routes->post('/group', function () {
GroupController::store();
});
$routes->get('/group/new', function () {
GroupController::create();
});
$routes->get('/group/:id', function ($id) {
GroupController::show($id);
示例3: array
$id = $_GET['id'];
$p = array();
$user = new UserController($conn);
$user->lang = $lang;
$user->UserLevel = $UserLevel;
$user->UserID = $UserID;
$user->lang_str = $lang_str;
switch ($action) {
case "list":
$user->browse();
break;
case "add":
$user->add();
break;
case "edit":
$user->edit($id);
break;
case "save":
$vars['edittype'] = $_POST['edittype'];
$vars['password'] = $_POST['password'];
$vars['password2'] = $_POST['password2'];
$vars['id'] = $_POST['id'];
$vars['user_id'] = $_POST['user_id'];
$vars['user_name'] = $_POST['user_name'];
$vars['title'] = $_POST['title'];
$vars['level'] = $_POST['level'];
$vars['email'] = $_POST['email'];
$vars['active'] = $_POST['active'];
$user->save($p, $vars);
break;
case "delete":