| Conditions | 4 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 31 | public function init() |
||
| 32 | { |
||
| 33 | // Determine the display mode |
||
| 34 | |||
| 35 | /* @var $ctrl MediaController */ |
||
| 36 | $ctrl = Yii::app()->controller; |
||
| 37 | $this->displayMode = $ctrl->getDisplayMode(DisplayMode::CONTEXT_SEASONS); |
||
| 38 | |||
| 39 | // Register some required scripts |
||
| 40 | if ($this->hasSeasons() && $this->displayMode === DisplayMode::MODE_LIST) |
||
| 41 | { |
||
| 42 | // If we only have one season we want the "drawer" to open |
||
| 43 | // automatically on page load |
||
| 44 | if (count($this->seasons) === 1) |
||
| 45 | { |
||
| 46 | Yii::app()->clientScript->registerScript('PopulateSingleSeason', |
||
| 47 | 'populateAll();', CClientScript::POS_END); |
||
| 48 | } |
||
| 72 |