FieldNavigation::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 11
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: VITALYIEGOROV
5
 * Date: 08.12.15
6
 * Time: 23:11
7
 */
8
namespace samsoncms\api\query;
9
10
use samson\activerecord\dbQuery;
11
use samsoncms\api\CMS;
12
use samsoncms\api\Navigation;
13
use samsoncms\api\Field;
14
15
/**
16
 * Additional field to navigation relation query.
17
 * @package samsoncms\api\query
18
 */
19 View Code Duplication
class FieldNavigation extends Relational
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
{
21
    /**
22
     * FieldNavigation constructor.
23
     * @param array $filteringIDs Collection of entity identifiers for filtering
24
     */
25
    public function __construct($filteringIDs = array())
26
    {
27
        parent::__construct(
28
            $GLOBALS['__core']->getContainer()->get('query'),
29
            Field::ENTITY,
30
            Field::F_PRIMARY,
31
            Navigation::F_PRIMARY,
32
            CMS::FIELD_NAVIGATION_RELATION_ENTITY,
33
            $filteringIDs
34
        );
35
    }
36
}
37