1 | <?php |
||
8 | class Util |
||
9 | { |
||
10 | /** |
||
11 | * Convert TZ |
||
12 | * |
||
13 | * @param string $date |
||
14 | * @param string $fromTimeZone |
||
15 | * @param string $toTimeZone |
||
16 | * @param string $format |
||
17 | * @return string |
||
18 | */ |
||
19 | public static function convertTz($date, $fromTimeZone, $toTimeZone, $format = 'Y-m-d H:i:s') |
||
26 | |||
27 | /** |
||
28 | * Clear text |
||
29 | * Can use for meta tags |
||
30 | * |
||
31 | * @param string $text |
||
32 | * @return string |
||
33 | */ |
||
34 | public static function clearText($text) |
||
39 | |||
40 | /** |
||
41 | * Make page title |
||
42 | * |
||
43 | * @param string $title |
||
44 | * @param string $appendToEnd |
||
45 | * @return string |
||
46 | */ |
||
47 | public static function makePageTitle($title = '', $appendToEnd = '') |
||
52 | |||
53 | /** |
||
54 | * Collect model errors |
||
55 | * |
||
56 | * @param Model $model the model to be validated |
||
57 | * @param mixed $attributes list of attributes that should be validated. |
||
58 | * @return array the error message array indexed by the attribute IDs. |
||
59 | */ |
||
60 | public static function collectModelErrors($model, $attributes = null) |
||
78 | } |
||
79 |