1 | <?php |
||
9 | class Util |
||
10 | { |
||
11 | /** |
||
12 | * Clear text |
||
13 | * Can use for meta tags |
||
14 | * |
||
15 | * @param string $text |
||
16 | * @return string |
||
17 | */ |
||
18 | 202 | public static function clearText($text) |
|
23 | |||
24 | /** |
||
25 | * Make page title |
||
26 | * |
||
27 | * @param string $title |
||
28 | * @param string $appendToEnd |
||
29 | * @return string |
||
30 | */ |
||
31 | 213 | public static function makePageTitle($title = '', $appendToEnd = '') |
|
36 | |||
37 | /** |
||
38 | * Collect model errors |
||
39 | * |
||
40 | * @param Model $model the model to be validated |
||
41 | * @return array the error message array indexed by the attribute IDs. |
||
42 | */ |
||
43 | 11 | public static function collectModelErrors($model) |
|
55 | |||
56 | /** |
||
57 | * Create manually UploadedFile instance by file path |
||
58 | * |
||
59 | * @param string $file file path |
||
60 | * @return UploadedFile |
||
61 | */ |
||
62 | 6 | public static function makeUploadedFile($file) |
|
76 | } |
||
77 |