@@ -9,57 +9,57 @@ |
||
9 | 9 | |
10 | 10 | class AttributeColumn extends BaseColumn |
11 | 11 | { |
12 | - public $formatters = ['text']; |
|
12 | + public $formatters = ['text']; |
|
13 | 13 | |
14 | - public $filter = TextFilter::class; |
|
14 | + public $filter = TextFilter::class; |
|
15 | 15 | |
16 | - /** |
|
17 | - * AttributeColumn constructor. |
|
18 | - * @param $config |
|
19 | - * @throws GridViewConfigException |
|
20 | - */ |
|
21 | - public function __construct($config) |
|
22 | - { |
|
23 | - parent::__construct($config); |
|
16 | + /** |
|
17 | + * AttributeColumn constructor. |
|
18 | + * @param $config |
|
19 | + * @throws GridViewConfigException |
|
20 | + */ |
|
21 | + public function __construct($config) |
|
22 | + { |
|
23 | + parent::__construct($config); |
|
24 | 24 | |
25 | - if (empty($this->title)) { |
|
26 | - $this->title = GridViewHelper::columnTitle($this->value); |
|
27 | - } |
|
28 | - } |
|
25 | + if (empty($this->title)) { |
|
26 | + $this->title = GridViewHelper::columnTitle($this->value); |
|
27 | + } |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * @return array |
|
32 | - */ |
|
33 | - protected function configTests(): array |
|
34 | - { |
|
35 | - return array_merge(parent::configTests(), [ |
|
36 | - 'value' => 'string', |
|
37 | - ]); |
|
38 | - } |
|
30 | + /** |
|
31 | + * @return array |
|
32 | + */ |
|
33 | + protected function configTests(): array |
|
34 | + { |
|
35 | + return array_merge(parent::configTests(), [ |
|
36 | + 'value' => 'string', |
|
37 | + ]); |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * @inheritdoc |
|
42 | - */ |
|
43 | - public function _renderValue($row) |
|
44 | - { |
|
45 | - $path = (array)$row; |
|
46 | - $exp = explode('.', $this->value); |
|
40 | + /** |
|
41 | + * @inheritdoc |
|
42 | + */ |
|
43 | + public function _renderValue($row) |
|
44 | + { |
|
45 | + $path = (array)$row; |
|
46 | + $exp = explode('.', $this->value); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Extract dots notation (column.sub.sub) |
|
50 | - */ |
|
51 | - foreach ($exp as $part) { |
|
48 | + /** |
|
49 | + * Extract dots notation (column.sub.sub) |
|
50 | + */ |
|
51 | + foreach ($exp as $part) { |
|
52 | 52 | |
53 | - if (isset($path[$part])) { |
|
54 | - $path = $path[$part]; |
|
53 | + if (isset($path[$part])) { |
|
54 | + $path = $path[$part]; |
|
55 | 55 | |
56 | - } elseif (isset($path->$part)) { |
|
57 | - $path = $path[$part]; |
|
58 | - } else { |
|
59 | - return $this->emptyValue; |
|
60 | - } |
|
61 | - } |
|
56 | + } elseif (isset($path->$part)) { |
|
57 | + $path = $path[$part]; |
|
58 | + } else { |
|
59 | + return $this->emptyValue; |
|
60 | + } |
|
61 | + } |
|
62 | 62 | |
63 | - return $path; |
|
64 | - } |
|
63 | + return $path; |
|
64 | + } |
|
65 | 65 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function _renderValue($row) |
44 | 44 | { |
45 | - $path = (array)$row; |
|
45 | + $path = (array) $row; |
|
46 | 46 | $exp = explode('.', $this->value); |
47 | 47 | |
48 | 48 | /** |