@@ -56,6 +56,10 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected $config; |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $name |
|
61 | + * @param string $title |
|
62 | + */ |
|
59 | 63 | public function __construct($name, $title = null, $value = ""){ |
60 | 64 | $this->config = $this->config()->default_config; |
61 | 65 | |
@@ -68,6 +72,9 @@ discard block |
||
68 | 72 | parent::__construct($name, $title, $value); |
69 | 73 | } |
70 | 74 | |
75 | + /** |
|
76 | + * @param Form $form |
|
77 | + */ |
|
71 | 78 | public function setForm($form) { |
72 | 79 | parent::setForm($form); |
73 | 80 | |
@@ -78,6 +85,9 @@ discard block |
||
78 | 85 | return $this; |
79 | 86 | } |
80 | 87 | |
88 | + /** |
|
89 | + * @param string $name |
|
90 | + */ |
|
81 | 91 | public function setName($name) { |
82 | 92 | parent::setName($name); |
83 | 93 | |
@@ -90,7 +100,7 @@ discard block |
||
90 | 100 | |
91 | 101 | /** |
92 | 102 | * @param array $properties |
93 | - * @return HTMLText |
|
103 | + * @return string |
|
94 | 104 | */ |
95 | 105 | public function FieldHolder($properties = array()) { |
96 | 106 | $config = array( |
@@ -105,7 +115,7 @@ discard block |
||
105 | 115 | |
106 | 116 | /** |
107 | 117 | * @param array $properties |
108 | - * @return HTMLText |
|
118 | + * @return string |
|
109 | 119 | */ |
110 | 120 | public function Field($properties = array()) { |
111 | 121 | Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css'); |
@@ -234,6 +244,7 @@ discard block |
||
234 | 244 | |
235 | 245 | /** |
236 | 246 | * @param FormField |
247 | + * @param DateField $field |
|
237 | 248 | */ |
238 | 249 | public function setDateField($field) { |
239 | 250 | $expected = $this->getName() . '[date]'; |
@@ -259,6 +270,7 @@ discard block |
||
259 | 270 | |
260 | 271 | /** |
261 | 272 | * @param FormField |
273 | + * @param TimeField $field |
|
262 | 274 | */ |
263 | 275 | public function setTimeField($field) { |
264 | 276 | $expected = $this->getName() . '[time]'; |
@@ -297,7 +309,7 @@ discard block |
||
297 | 309 | * to set field-specific config options. |
298 | 310 | * |
299 | 311 | * @param string $name |
300 | - * @param mixed $val |
|
312 | + * @param string $val |
|
301 | 313 | */ |
302 | 314 | public function setConfig($name, $val) { |
303 | 315 | $this->config[$name] = $val; |
@@ -315,7 +327,7 @@ discard block |
||
315 | 327 | * to get field-specific config options. |
316 | 328 | * |
317 | 329 | * @param String $name Optional, returns the whole configuration array if empty |
318 | - * @return mixed |
|
330 | + * @return string |
|
319 | 331 | */ |
320 | 332 | public function getConfig($name = null) { |
321 | 333 | if($name) { |
@@ -325,6 +337,9 @@ discard block |
||
325 | 337 | } |
326 | 338 | } |
327 | 339 | |
340 | + /** |
|
341 | + * @param RequiredFields $validator |
|
342 | + */ |
|
328 | 343 | public function validate($validator) { |
329 | 344 | $dateValid = $this->dateField->validate($validator); |
330 | 345 | $timeValid = $this->timeField->validate($validator); |
@@ -50,6 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | * By default, this is set to true so that it's clearer what's happening, but the predefined |
52 | 52 | * {@link GridFieldConfig} subclasses set this to false for flexibility. |
53 | + * @param boolean $throwExceptionOnBadDataType |
|
53 | 54 | */ |
54 | 55 | public function setThrowExceptionOnBadDataType($throwExceptionOnBadDataType) { |
55 | 56 | $this->throwExceptionOnBadDataType = $throwExceptionOnBadDataType; |
@@ -65,6 +66,7 @@ discard block |
||
65 | 66 | /** |
66 | 67 | * Check that this dataList is of the right data type. |
67 | 68 | * Returns false if it's a bad data type, and if appropriate, throws an exception. |
69 | + * @param SS_List $dataList |
|
68 | 70 | */ |
69 | 71 | protected function checkDataType($dataList) { |
70 | 72 | if($dataList instanceof SS_Limitable) { |
@@ -271,6 +273,7 @@ discard block |
||
271 | 273 | |
272 | 274 | /** |
273 | 275 | * @param Int |
276 | + * @param integer $num |
|
274 | 277 | */ |
275 | 278 | public function setItemsPerPage($num) { |
276 | 279 | $this->itemsPerPage = $num; |
@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | */ |
24 | 24 | private static $currency_symbol = '$'; |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $name |
|
28 | + */ |
|
26 | 29 | public function __construct($name = null, $wholeSize = 9, $decimalSize = 2, $defaultValue = 0) { |
27 | 30 | parent::__construct($name, $wholeSize, $decimalSize, $defaultValue); |
28 | 31 | } |
@@ -46,6 +49,9 @@ discard block |
||
46 | 49 | else return $val; |
47 | 50 | } |
48 | 51 | |
52 | + /** |
|
53 | + * @param string $value |
|
54 | + */ |
|
49 | 55 | public function setValue($value, $record = null) { |
50 | 56 | $matches = null; |
51 | 57 | if(is_numeric($value)) { |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | private static $nice_format = 'd/m/Y'; |
29 | 29 | |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $value |
|
33 | + */ |
|
31 | 34 | public function setValue($value, $record = null) { |
32 | 35 | if($value === false || $value === null || (is_string($value) && !strlen($value))) { |
33 | 36 | // don't try to evaluate empty values with strtotime() below, as it returns "1970-01-01" when it should be |
@@ -110,7 +113,7 @@ discard block |
||
110 | 113 | |
111 | 114 | /** |
112 | 115 | * Returns the day of the month. |
113 | - * @param boolean $includeOrdinals Include ordinal suffix to day, e.g. "th" or "rd" |
|
116 | + * @param boolean $includeOrdinal Include ordinal suffix to day, e.g. "th" or "rd" |
|
114 | 117 | * @return string |
115 | 118 | */ |
116 | 119 | public function DayOfMonth($includeOrdinal = false) { |
@@ -52,6 +52,9 @@ |
||
52 | 52 | return 0; |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param integer $value |
|
57 | + */ |
|
55 | 58 | public function prepValueForDB($value) { |
56 | 59 | if($value === true) { |
57 | 60 | return 1; |
@@ -129,6 +129,7 @@ |
||
129 | 129 | |
130 | 130 | /** |
131 | 131 | * @param boolean |
132 | + * @param boolean $bool |
|
132 | 133 | */ |
133 | 134 | public function setAllowMultibyte($bool) { |
134 | 135 | $this->allowMultibyte = $bool; |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | * Extend permissions to include additional security for objects that are not published to live. |
766 | 766 | * |
767 | 767 | * @param Member $member |
768 | - * @return bool|null |
|
768 | + * @return false|null |
|
769 | 769 | */ |
770 | 770 | public function canView($member = null) { |
771 | 771 | // Invoke default version-gnostic canView |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | * |
840 | 840 | * @param string $stage |
841 | 841 | * @param Member $member |
842 | - * @return bool |
|
842 | + * @return boolean|string |
|
843 | 843 | */ |
844 | 844 | public function canViewStage($stage = 'Live', $member = null) { |
845 | 845 | $oldMode = Versioned::get_reading_mode(); |
@@ -905,7 +905,7 @@ discard block |
||
905 | 905 | /** |
906 | 906 | * Is the latest version of the object published? |
907 | 907 | * |
908 | - * @return bool |
|
908 | + * @return string |
|
909 | 909 | */ |
910 | 910 | public function latestPublished() { |
911 | 911 | // Get the root data object class - this will have the version field |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | * @param string $limit |
1030 | 1030 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1031 | 1031 | * @param string $having |
1032 | - * @return DataList |
|
1032 | + * @return ArrayList |
|
1033 | 1033 | */ |
1034 | 1034 | public function Versions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { |
1035 | 1035 | return $this->allVersions($filter, $sort, $limit, $join, $having); |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | * @param string $limit |
1044 | 1044 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1045 | 1045 | * @param string $having |
1046 | - * @return DataList |
|
1046 | + * @return ArrayList |
|
1047 | 1047 | */ |
1048 | 1048 | public function allVersions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { |
1049 | 1049 | // Make sure the table names are not postfixed (e.g. _Live) |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | * @param string $filter A filter to be inserted into the WHERE clause. |
1362 | 1362 | * @param string $sort A sort expression to be inserted into the ORDER BY clause. |
1363 | 1363 | * @param string $join Deprecated, use leftJoin($table, $joinClause) instead |
1364 | - * @param string|int $limit A limit on the number of records returned from the database. |
|
1364 | + * @param integer $limit A limit on the number of records returned from the database. |
|
1365 | 1365 | * @param string $containerClass The container class for the result set (default is DataList) |
1366 | 1366 | * |
1367 | 1367 | * @return DataList A modified DataList designated to the specified stage |
@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | ); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param Requirements_Backend $backend |
|
56 | + */ |
|
54 | 57 | protected function setupCombinedRequirements($backend) { |
55 | 58 | $basePath = $this->getCurrentRelativePath(); |
56 | 59 | |
@@ -76,6 +79,9 @@ discard block |
||
76 | 79 | ); |
77 | 80 | } |
78 | 81 | |
82 | + /** |
|
83 | + * @param Requirements_Backend $backend |
|
84 | + */ |
|
79 | 85 | protected function setupCombinedNonrequiredRequirements($backend) { |
80 | 86 | $basePath = $this->getCurrentRelativePath(); |
81 | 87 | |
@@ -482,6 +488,10 @@ discard block |
||
482 | 488 | $this->assertContains('var myvar="<head></head>";', $backend->includeInHTML(false, $template)); |
483 | 489 | } |
484 | 490 | |
491 | + /** |
|
492 | + * @param Requirements_Backend $backend |
|
493 | + * @param string $type |
|
494 | + */ |
|
485 | 495 | public function assertFileIncluded($backend, $type, $files) { |
486 | 496 | $type = strtolower($type); |
487 | 497 | switch (strtolower($type)) { |
@@ -526,6 +536,10 @@ discard block |
||
526 | 536 | } |
527 | 537 | } |
528 | 538 | |
539 | + /** |
|
540 | + * @param Requirements_Backend $backend |
|
541 | + * @param string $type |
|
542 | + */ |
|
529 | 543 | public function assertFileNotIncluded($backend, $type, $files) { |
530 | 544 | $type = strtolower($type); |
531 | 545 | switch ($type) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * left. |
87 | 87 | * @param array $attributes an array of attributes to include on the link. |
88 | 88 | * |
89 | - * @return boolean The result of the operation. |
|
89 | + * @return boolean|null The result of the operation. |
|
90 | 90 | */ |
91 | 91 | public static function add_link($code, $menuTitle, $url, $priority = -1, $attributes = null) { |
92 | 92 | return self::add_menu_item($code, $menuTitle, $url, null, $priority, $attributes); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @param int $priority |
108 | 108 | * @param array $attributes an array of attributes to include on the link. |
109 | 109 | * |
110 | - * @return boolean Success |
|
110 | + * @return boolean|null Success |
|
111 | 111 | */ |
112 | 112 | public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
113 | 113 | $attributes = null) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * @param int $priority |
240 | 240 | * @param array $attributes an array of attributes to include on the link. |
241 | 241 | * |
242 | - * @return boolean Success |
|
242 | + * @return boolean|null Success |
|
243 | 243 | */ |
244 | 244 | public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
245 | 245 | $attributes = null) { |
@@ -258,6 +258,8 @@ discard block |
||
258 | 258 | |
259 | 259 | /** |
260 | 260 | * Add a previously built menu item object to the menu |
261 | + * @param string $code |
|
262 | + * @param CMSMenuItem $cmsMenuItem |
|
261 | 263 | */ |
262 | 264 | protected static function add_menu_item_obj($code, $cmsMenuItem) { |
263 | 265 | self::$menu_item_changes[] = array( |