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'); 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);