1 | <?php |
||
18 | class TableMultilanguage extends Widget |
||
19 | { |
||
20 | /** |
||
21 | * Language model. |
||
22 | * For multilanguage mode. |
||
23 | * |
||
24 | * @var LanguageListInterface |
||
25 | */ |
||
26 | private $languageModel; |
||
27 | |||
28 | /** |
||
29 | * Field list |
||
30 | * For each field, you must specify its name: name. Optional parameter: label. |
||
31 | * To get the value of a field from other parts, you need to specify the path with the combination of entities through the point. |
||
32 | * Example: |
||
33 | * fields => [ |
||
34 | * [ |
||
35 | * 'name' => 'id', |
||
36 | * 'label' => 'Name', |
||
37 | * ], |
||
38 | * [ |
||
39 | * 'name' => 'title', |
||
40 | * 'label' => 'Title', |
||
41 | * ], |
||
42 | * [ |
||
43 | * 'name' => 'posts.tag', |
||
44 | * 'label' => 'Post tags', |
||
45 | * ] |
||
46 | * ]; |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | public $fields = []; |
||
51 | |||
52 | /** |
||
53 | * Model for current fields. |
||
54 | * |
||
55 | * @var Model |
||
56 | */ |
||
57 | private $model; |
||
58 | |||
59 | /** |
||
60 | * Sets the language model. |
||
61 | * |
||
62 | * @param mixed $languageModel |
||
63 | * |
||
64 | * @return void |
||
65 | */ |
||
66 | public function setLanguageModel(LanguageListInterface $languageModel): void |
||
70 | |||
71 | /** |
||
72 | * Sets the model of the current fields. |
||
73 | * |
||
74 | * @param Model $model |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | public function setModel(Model $model): void |
||
82 | |||
83 | /** |
||
84 | * Starts output for each specified field of the translation list. |
||
85 | * |
||
86 | * @throws InvalidConfigException |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | public function run(): string |
||
102 | } |
||
103 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..