RecentlyAddedEpisodeList   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getColumns() 0 14 1
1
<?php
2
3
/**
4
 * Implementation of EpisodeList for the recently added TV shows view. It adds 
5
 * a column containing a link to the TV show to the beginning of the grid.
6
 *
7
 * @author Sam Stenvall <[email protected]>
8
 * @copyright Copyright &copy; Sam Stenvall 2013-
9
 * @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
10
 */
11
class RecentlyAddedEpisodeList extends EpisodeList
12
{
13
14
	protected function getColumns()
15
	{
16
		$showColumn = array(
17
			array(
18
				'type'=>'raw',
19
				'name'=>'showtitle',
20
				'header'=>Yii::t('RecentlyAddedEpisodes', 'TV Show'),
21
				'value'=>function($data) {
22
					return CHtml::link($data->showtitle, Yii::app()->createUrl('tvShow/details', array('id'=>$data->tvshowid)));
23
				}
24
			)
25
		);
26
27
		return array_merge($showColumn, parent::getColumns());
28
	}
29
30
}
31