| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 3 |
| 1 | <?php |
||
| 55 | protected function registerJsOptions() |
||
| 56 | { |
||
| 57 | $opts = [ |
||
| 58 | 'var currentUserId = '.($this->user_id ?: 0).';', |
||
| 59 | 'var port = '.$this->port.';', |
||
| 60 | 'var chatList = '.Json::encode($this->chatList).';', |
||
| 61 | 'var imgPath = "'.Yii::$app->assetManager->getPublishedUrl($this->imgPath).'";', |
||
| 62 | ]; |
||
| 63 | $this->getView()->registerJs(implode(' ', $opts), View::POS_BEGIN); |
||
| 64 | } |
||
| 65 | } |
||
| 67 |