mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-10 17:29:18 -04:00
First iteration of REST controller refactoring. RESTful controllers that refer to collections should now have plural names and there should be only one controller per resource. Updated existing classes that implement REST_Controller. The routing now works like this:
GET /controller -> controller::_index() POST /controller -> controller::_create() GET /controller/id -> controller::_show() PUT /controller/id -> controller::_update() DELETE /controller/id -> controller::_delete() GET /form/edit/controller/resource_id -> controller::_form() GET /form/add/controller/data -> controller::_form()
This commit is contained in:
@@ -31,7 +31,7 @@ class user {
|
||||
*/
|
||||
public static function get_edit_form($user) {
|
||||
$form = new Forge(
|
||||
url::site("user/{$user->id}?_method=put"), "", "post", array("id" => "gUserForm"));
|
||||
url::site("users/{$user->id}?_method=put"), "", "post", array("id" => "gUserForm"));
|
||||
$group = $form->group(_("User Info"));
|
||||
$group->input("name") ->label(_("Name")) ->id("gName") ->value($user->name);
|
||||
$group->input("display_name") ->label(_("Display Name")) ->id("gDisplayName") ->value($user->display_name);
|
||||
|
||||
Reference in New Issue
Block a user