Skip to content

Commit

Permalink
Merge pull request #31 from getmanenko/master
Browse files Browse the repository at this point in the history
Update class name
  • Loading branch information
vitalyiegorov authored Aug 30, 2016
2 parents 91261c1 + 9d7d96f commit e4d4ec0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down
8 changes: 5 additions & 3 deletions src/FieldMaterialTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
* Created by Maxim Omelchenko <[email protected]>
* on 24.12.2014 at 13:23
*/
use samsoncms\api\Navigation;
use samsoncms\api\NavigationMaterial;

/**
* Class FieldMaterialTable
* @author Maxim Omelchenko <[email protected]>
* @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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit e4d4ec0

Please sign in to comment.