Conditions | 4 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function init() |
||
35 | { |
||
36 | if (is_null($this->model) || !($this->model instanceof Profile)) { |
||
37 | if (!$this->organization) { |
||
38 | throw new \yii\base\InvalidConfigException("Organization or Profile should either be valid."); |
||
39 | } |
||
40 | $this->model = $this->organization->createProfile(['scenario' => Profile::SCENARIO_UPDATE]); |
||
41 | } |
||
42 | } |
||
43 | |||
49 |