From b4be854dd35ddc2f71e58b1400014078b06e2f5e Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Thu, 20 Jul 2017 11:57:36 +0300 Subject: [PATCH] Prepare for framework 7.6.1 --- src/Generator/views/controllers/crud.phtml | 4 +--- src/Generator/views/controllers/rest.phtml | 4 +--- tests/Generator/samples/rest.html | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Generator/views/controllers/crud.phtml b/src/Generator/views/controllers/crud.phtml index 86b90ee..24c66d4 100644 --- a/src/Generator/views/controllers/crud.phtml +++ b/src/Generator/views/controllers/crud.phtml @@ -26,9 +26,7 @@ return function () { /** * @var Controller $this */ - $crud = new Crud(); - - $crud->setCrud(\Crud::getInstance()); + $crud = new Crud(\Crud::getInstance()); $crud->get('system', 'crud/get'); $crud->post('system', 'crud/post'); diff --git a/src/Generator/views/controllers/rest.phtml b/src/Generator/views/controllers/rest.phtml index 450823d..09686db 100644 --- a/src/Generator/views/controllers/rest.phtml +++ b/src/Generator/views/controllers/rest.phtml @@ -30,9 +30,7 @@ return function () { /** * @var Controller $this */ - $rest = new Rest(); - - $rest->setCrud(\Crud::getInstance()); + $rest = new Rest(\Crud::getInstance()); $rest->head('system', 'rest/head', 'Read'); $rest->get('system', 'rest/get', 'Read'); diff --git a/tests/Generator/samples/rest.html b/tests/Generator/samples/rest.html index 5075427..373720d 100644 --- a/tests/Generator/samples/rest.html +++ b/tests/Generator/samples/rest.html @@ -29,9 +29,7 @@ /** * @var Controller $this */ - $rest = new Rest(); - - $rest->setCrud(Users\Crud::getInstance()); + $rest = new Rest(Users\Crud::getInstance()); $rest->head('system', 'rest/head', 'Read'); $rest->get('system', 'rest/get', 'Read');