1 | <?php |
||
8 | class ViewHelper |
||
9 | { |
||
10 | /** |
||
11 | * Строит виджет FMenu по входному массиву или масииву объектов |
||
12 | * @param CComponent[]|array $elements |
||
13 | * @param array $attributeOptions атрибуты для построения эламента массива из объектов |
||
14 | * @param array $menuOptions опции виджета FMenu |
||
15 | * |
||
16 | * @return array |
||
17 | * |
||
18 | * Пример использования: |
||
19 | * ViewHelper::menu($part, array('label' => 'name', 'url' => 'url'), array('itemTemplate' => '{menu} ({linkCount})')) |
||
20 | */ |
||
21 | 7 | public static function menu($elements, $attributeOptions = array(), $menuOptions = array()) |
|
50 | |||
51 | public static function header($header, $tag = 'h1', $htmlOptions = array()) |
||
55 | |||
56 | /** |
||
57 | * Заменяет содержащиеся в $template выражения вида {выражение} на своиства или заначения $data |
||
58 | * @param string $template шаблон |
||
59 | * @param array|CComponent $data источник данных для замены объект или массив |
||
60 | * @param bool $clearNotReplaced очистить не замененные выражения default false |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | 1 | public static function replace($template, $data, $clearNotReplaced = false) |
|
91 | |||
92 | /** |
||
93 | * @return Contact|FActiveRecord|null |
||
94 | */ |
||
95 | 7 | public static function contact() |
|
102 | |||
103 | /** |
||
104 | * @return ContactField[] |
||
105 | */ |
||
106 | 7 | public static function phones() |
|
115 | |||
116 | /** |
||
117 | * @param bool $clear |
||
118 | * |
||
119 | * @return ContactField|null|string |
||
120 | */ |
||
121 | public static function phone($clear = false) |
||
132 | |||
133 | 7 | public static function getClearPhone($phone) |
|
146 | } |
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.