Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class TypeQuery extends \hiqdev\yii\DataMapper\query\Query |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $modelClass = Type::class; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | protected function attributesMap() |
||
29 | { |
||
30 | return [ |
||
31 | 'id' => 'zr.obj_id', |
||
32 | 'name' => new Expression("pr.name || ',' || zr.name as name"), |
||
33 | // TODO: Drop ˯˯˯˯˯˯˯˯ this after removing models |
||
34 | new JoinedField('fullName', 'zh.name', $this->getModel()->getAttribute('fullName'), 'fullRef'), |
||
35 | ]; |
||
36 | } |
||
37 | |||
38 | public function joins() |
||
42 | ]; |
||
43 | } |
||
44 | |||
45 | public function initFrom() |
||
50 | } |
||
51 | } |
||
52 |