diff --git a/classes/Dvelum/App/Backend/Designer/Module/Objects.php b/classes/Dvelum/App/Backend/Designer/Module/Objects.php index 69519b4..f3218d2 100644 --- a/classes/Dvelum/App/Backend/Designer/Module/Objects.php +++ b/classes/Dvelum/App/Backend/Designer/Module/Objects.php @@ -20,6 +20,7 @@ namespace Dvelum\App\Backend\Designer\Module; use Dvelum\App\Backend\Designer\Module; +use Dvelum\Designer\Factory; use Dvelum\Designer\Manager; use Dvelum\Designer\Project; use Dvelum\Designer\Project\Container; @@ -526,7 +527,7 @@ protected function getRelatedProjects($project, & $list) } $projectFile = $manager->findWorkingCopy($file); - $subProject = \Designer_Factory::loadProject($this->designerConfig, $projectFile); + $subProject = Factory::loadProject($this->designerConfig, $projectFile); $list[] = [ 'project' => $subProject, 'file' => $file @@ -551,6 +552,7 @@ public function relatedProjectListAction() if (empty($relatedProjects)) { $this->response->success([]); + return; } $result = []; diff --git a/classes/Dvelum/App/Backend/Designer/Module/Project.php b/classes/Dvelum/App/Backend/Designer/Module/Project.php index 2817141..fdc1a89 100644 --- a/classes/Dvelum/App/Backend/Designer/Module/Project.php +++ b/classes/Dvelum/App/Backend/Designer/Module/Project.php @@ -19,6 +19,7 @@ namespace Dvelum\App\Backend\Designer\Module; +use Dvelum\App\Backend\Designer\Generator\Component; use Dvelum\App\Backend\Designer\Module; use Dvelum\App\Backend\Localization\Manager; use Dvelum\Config; @@ -448,7 +449,7 @@ public function addTemplateAction() $adapterObject = new $adapter(); - if (!$adapterObject instanceof \Backend_Designer_Generator_Component) { + if (!$adapterObject instanceof Component) { $this->response->error($this->lang->get('WRONG_REQUEST') . ' invalid adapter interface'); return; } diff --git a/composer.json b/composer.json index 12d847c..af3a9f9 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "dvelum/module-designer", - "version": "1.6.0", + "version": "1.6.1", "type": "dvelum3-module", "description": "Designer module for DVelum", "keywords": ["dvelum","designer"], diff --git a/configs/designer_templates.php b/configs/designer_templates.php index fd5f043..8c7a77d 100644 --- a/configs/designer_templates.php +++ b/configs/designer_templates.php @@ -1,10 +1,11 @@ '', - 'text' => 'Window Form', - 'iconCls'=>'objectWindowIcon', - 'adapter'=>'Backend_Designer_Generator_Component_Window', - 'showType'=>'loaded' - ) -); \ No newline at end of file + +return [ + [ + 'icon' => '', + 'text' => 'Window Form', + 'iconCls' => 'objectWindowIcon', + 'adapter' => \Dvelum\App\Backend\Designer\Generator\Component\Window::class, + 'showType' => 'loaded' + ] +]; \ No newline at end of file diff --git a/configs/versions.php b/configs/versions.php index 91aaaed..a2c9463 100644 --- a/configs/versions.php +++ b/configs/versions.php @@ -1,4 +1,4 @@ '1.5.7' + 'designer' => '1.6.1' ]; \ No newline at end of file