| @@ 49-60 (lines=12) @@ | ||
| 46 | * Returns the column definition for the year column |
|
| 47 | * @return array |
|
| 48 | */ |
|
| 49 | protected function getYearColumn() |
|
| 50 | { |
|
| 51 | return array( |
|
| 52 | 'name'=>'year', |
|
| 53 | 'header'=>Yii::t('GenericList', 'Year'), |
|
| 54 | 'value'=>function($data) { |
|
| 55 | // Year is zero when it's not available |
|
| 56 | if ($data->year !== 0) |
|
| 57 | echo $data->year; |
|
| 58 | } |
|
| 59 | ); |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * Returns the column definition for the genre column |
|
| @@ 45-55 (lines=11) @@ | ||
| 42 | * Returns the column definition for the runtime column |
|
| 43 | * @return array |
|
| 44 | */ |
|
| 45 | private function getRuntimeColumn() |
|
| 46 | { |
|
| 47 | return array( |
|
| 48 | 'name'=>'runtime', |
|
| 49 | 'header'=>Yii::t('GenericList', 'Runtime'), |
|
| 50 | 'value'=>function($data) { |
|
| 51 | /* @var $data Movie */ |
|
| 52 | echo $data->getRuntimeString(); |
|
| 53 | } |
|
| 54 | ); |
|
| 55 | } |
|
| 56 | ||
| 57 | ||
| 58 | /** |
|