1 | <?php |
||
19 | class TbDataColumn extends CDataColumn |
||
20 | { |
||
21 | /** |
||
22 | * @var array HTML options for filter input |
||
23 | * @see TbDataColumn::renderFilterCellContent() |
||
24 | */ |
||
25 | public $filterInputOptions; |
||
26 | |||
27 | /** |
||
28 | *### .renderHeaderCellContent() |
||
29 | * |
||
30 | * Renders the header cell content. |
||
31 | * This method will render a link that can trigger the sorting if the column is sortable. |
||
32 | */ |
||
33 | protected function renderHeaderCellContent() |
||
34 | { |
||
35 | if ($this->grid->enableSorting && $this->sortable && $this->name !== null) { |
||
36 | $sort = $this->grid->dataProvider->getSort(); |
||
37 | $label = isset($this->header) ? $this->header : $sort->resolveLabel($this->name); |
||
38 | |||
39 | |||
40 | if ($sort->resolveAttribute($this->name) !== false) |
||
41 | $label .= ' <span class="caret"></span>'; |
||
42 | |||
43 | echo $sort->link($this->name, $label, array('class' => 'sort-link')); |
||
44 | } else { |
||
45 | if ($this->name !== null && $this->header === null) { |
||
46 | if ($this->grid->dataProvider instanceof CActiveDataProvider) { |
||
|
|||
47 | echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name)); |
||
48 | } else { |
||
49 | echo CHtml::encode($this->name); |
||
50 | } |
||
51 | } else { |
||
52 | parent::renderHeaderCellContent(); |
||
53 | } |
||
54 | } |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | *### .renderFilterCell() |
||
59 | * |
||
60 | * Renders the filter cell. |
||
61 | * @author antonio ramirez <[email protected]> |
||
62 | * @since 24/09/2012 added filterHtmlOptions |
||
63 | */ |
||
64 | public function renderFilterCell() |
||
72 | |||
73 | /** |
||
74 | *### .renderFilterCellContent() |
||
75 | * |
||
76 | * Renders the filter cell content. |
||
77 | * On top of Yii's default, here we can provide HTML options for actual filter input |
||
78 | * @author Sergii Gamaiunov <[email protected]> |
||
79 | */ |
||
80 | protected function renderFilterCellContent() |
||
115 | } |
||
116 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.