From fde02719bf2eda26a2bfcae0b633440cb3319032 Mon Sep 17 00:00:00 2001 From: getmanenko Date: Tue, 30 Aug 2016 16:58:07 +0300 Subject: [PATCH 1/3] Update Application.php --- src/Application.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Application.php b/src/Application.php index 005cdb0..a87166c 100644 --- a/src/Application.php +++ b/src/Application.php @@ -9,6 +9,7 @@ use samson\activerecord\dbQuery; use samson\cms\web\navigation\CMSNav; use samson\treeview\SamsonTree; +use samsoncms\api\Navigation; /** * SamsonCMS material input module @@ -74,7 +75,7 @@ public function __async_table($structureId, $search = null, $page = null) $structure = null; // Try to find it in database - dbQuery('\samson\cms\Navigation')->id($structureId)->first($structure); + dbQuery(Navigation::class)->id($structureId)->first($structure); /** @var FieldMaterialTable $table Object to store set of materials */ $table = new FieldMaterialTable($structure, $search, $page); @@ -104,7 +105,7 @@ public function __async_getchild($structureId) $structure = null; // If structure was found by Identifier - if (dbQuery('\samson\cms\Navigation')->cond('StructureID', $structureId)->first($structure)) { + if (dbQuery(Navigation::class)->cond('StructureID', $structureId)->first($structure)) { /** @var SamsonTree $tree Object to store tree structure */ $tree = new SamsonTree('tree/template', 0, 'product/addchildren'); From 0c06a21a99872470c5f733acfbdfcb83e8163809 Mon Sep 17 00:00:00 2001 From: getmanenko Date: Tue, 30 Aug 2016 17:03:39 +0300 Subject: [PATCH 2/3] Update Application.php From 9d7d96fce2498d133e567f35e4f1297d8ed3824c Mon Sep 17 00:00:00 2001 From: getmanenko Date: Tue, 30 Aug 2016 17:04:47 +0300 Subject: [PATCH 3/3] Update FieldMaterialTable.php --- src/FieldMaterialTable.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FieldMaterialTable.php b/src/FieldMaterialTable.php index 64def30..3eab99a 100644 --- a/src/FieldMaterialTable.php +++ b/src/FieldMaterialTable.php @@ -5,13 +5,15 @@ * Created by Maxim Omelchenko * on 24.12.2014 at 13:23 */ +use samsoncms\api\Navigation; +use samsoncms\api\NavigationMaterial; /** * Class FieldMaterialTable * @author Maxim Omelchenko * @package samsoncms\input\material */ -class FieldMaterialTable extends \samsoncms\app\material\Table +class FieldMaterialTable extends \samson\cms\web\material\Table { /** Table rows count */ const ROWS_COUNT = 10; @@ -49,7 +51,7 @@ class FieldMaterialTable extends \samsoncms\app\material\Table * @param string $search Keywords to search in materials * @param string $page Current table page number */ - public function __construct(\samson\cms\Navigation & $structure = null, $search = null, $page = null) + public function __construct(Navigation & $structure = null, $search = null, $page = null) { // Call parent constructor parent::__construct($structure, $search, $page); @@ -65,7 +67,7 @@ public function queryHandler() $materialIds = array(); // Fill our recently declared array - $matIdQuery = dbQuery('samson\cms\CMSNavMaterial'); + $matIdQuery = dbQuery(NavigationMaterial::class); if (!empty($this->nav)) { $childStructures = array($this->nav->id);