Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
45 | public function getComponent() { |
||
46 | if (!empty(\yii::$app->components['sitemap'])) { |
||
47 | $component = \yii::$app->components['sitemap']; |
||
48 | } else if (!($component = $this->get('sitemap', false))) { |
||
49 | throw new Exception('Component for sitemap module is required. Define it via application components ' |
||
50 | . 'or module components'); |
||
51 | } |
||
52 | |||
53 | $component->moduleId = $this->uniqueId; |
||
54 | |||
55 | return $component; |
||
56 | } |
||
57 | } |
||
58 |