1 | <?php |
||
12 | class Category extends \Model { |
||
13 | static $cols = [ |
||
|
|||
14 | 'catalog_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'catalog'], |
||
15 | 'category_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'category'], |
||
16 | ]; |
||
17 | static $labels = [ |
||
18 | 'category_id' => 'Раздел товаров' |
||
19 | ]; |
||
20 | static $dataManagers = [ |
||
21 | 'manager' => [ |
||
22 | 'cols' => ['category_id'] |
||
23 | ] |
||
24 | ]; |
||
25 | static $forms = [ |
||
26 | 'manager' => [ |
||
27 | 'map' => [['category_id']] |
||
28 | ] |
||
29 | ]; |
||
30 | |||
31 | public function afterSave() { |
||
37 | |||
38 | static function relations() { |
||
50 | } |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.