@@ -69,6 +69,10 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected $config; |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $name |
|
74 | + * @param string $title |
|
75 | + */ |
|
72 | 76 | public function __construct($name, $title = null, $value = ""){ |
73 | 77 | $this->config = $this->config()->default_config; |
74 | 78 | |
@@ -79,6 +83,9 @@ discard block |
||
79 | 83 | parent::__construct($name, $title, $value); |
80 | 84 | } |
81 | 85 | |
86 | + /** |
|
87 | + * @param Form $form |
|
88 | + */ |
|
82 | 89 | public function setForm($form) { |
83 | 90 | parent::setForm($form); |
84 | 91 | |
@@ -89,6 +96,9 @@ discard block |
||
89 | 96 | return $this; |
90 | 97 | } |
91 | 98 | |
99 | + /** |
|
100 | + * @param string $name |
|
101 | + */ |
|
92 | 102 | public function setName($name) { |
93 | 103 | parent::setName($name); |
94 | 104 | |
@@ -101,7 +111,7 @@ discard block |
||
101 | 111 | |
102 | 112 | /** |
103 | 113 | * @param array $properties |
104 | - * @return string |
|
114 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
105 | 115 | */ |
106 | 116 | public function FieldHolder($properties = array()) { |
107 | 117 | $config = array( |
@@ -115,7 +125,7 @@ discard block |
||
115 | 125 | |
116 | 126 | /** |
117 | 127 | * @param array $properties |
118 | - * @return string |
|
128 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
119 | 129 | */ |
120 | 130 | public function Field($properties = array()) { |
121 | 131 | Requirements::css(FRAMEWORK_DIR . '/client/dist/styles/DatetimeField.css'); |
@@ -228,6 +238,9 @@ discard block |
||
228 | 238 | return $this; |
229 | 239 | } |
230 | 240 | |
241 | + /** |
|
242 | + * @param boolean $bool |
|
243 | + */ |
|
231 | 244 | public function setReadonly($bool) { |
232 | 245 | parent::setReadonly($bool); |
233 | 246 | $this->dateField->setReadonly($bool); |
@@ -317,7 +330,7 @@ discard block |
||
317 | 330 | * to set field-specific config options. |
318 | 331 | * |
319 | 332 | * @param string $name |
320 | - * @param mixed $val |
|
333 | + * @param string $val |
|
321 | 334 | * @return $this |
322 | 335 | */ |
323 | 336 | public function setConfig($name, $val) { |
@@ -336,7 +349,7 @@ discard block |
||
336 | 349 | * to get field-specific config options. |
337 | 350 | * |
338 | 351 | * @param String $name Optional, returns the whole configuration array if empty |
339 | - * @return mixed |
|
352 | + * @return string|null |
|
340 | 353 | */ |
341 | 354 | public function getConfig($name = null) { |
342 | 355 | if($name) { |
@@ -346,6 +359,9 @@ discard block |
||
346 | 359 | } |
347 | 360 | } |
348 | 361 | |
362 | + /** |
|
363 | + * @param RequiredFields $validator |
|
364 | + */ |
|
349 | 365 | public function validate($validator) { |
350 | 366 | $dateValid = $this->dateField->validate($validator); |
351 | 367 | $timeValid = $this->timeField->validate($validator); |
@@ -79,6 +79,9 @@ discard block |
||
79 | 79 | $this->sequentialSaveableSet = null; |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param FormField[] $list |
|
84 | + */ |
|
82 | 85 | protected function collateDataFields(&$list, $saveableOnly = false) { |
83 | 86 | foreach($this as $field) { |
84 | 87 | if($field instanceof CompositeField) { |
@@ -175,7 +178,7 @@ discard block |
||
175 | 178 | * Removes a number of fields from a Tab/TabSet within this FieldList. |
176 | 179 | * |
177 | 180 | * @param string $tabName The name of the Tab or TabSet field |
178 | - * @param array $fields A list of fields, e.g. array('Name', 'Email') |
|
181 | + * @param string[] $fields A list of fields, e.g. array('Name', 'Email') |
|
179 | 182 | */ |
180 | 183 | public function removeFieldsFromTab($tabName, $fields) { |
181 | 184 | $this->flushFieldsCache(); |
@@ -568,7 +571,7 @@ discard block |
||
568 | 571 | } |
569 | 572 | |
570 | 573 | /** |
571 | - * @param $field |
|
574 | + * @param CompositeField $field |
|
572 | 575 | * @return $this |
573 | 576 | */ |
574 | 577 | public function setContainerField($field) { |
@@ -638,6 +641,7 @@ discard block |
||
638 | 641 | * the children collection. Doesn't work recursively. |
639 | 642 | * |
640 | 643 | * @param string|FormField |
644 | + * @param string $field |
|
641 | 645 | * @return int Position in children collection (first position starts with 0). |
642 | 646 | * Returns FALSE if the field can't be found. |
643 | 647 | */ |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @param array $properties |
94 | - * @return string |
|
94 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
95 | 95 | */ |
96 | 96 | public function Field($properties = array()) { |
97 | 97 | $properties = array_merge($properties, array( |
@@ -259,7 +259,6 @@ discard block |
||
259 | 259 | * for each of these categories |
260 | 260 | * |
261 | 261 | * @param string $category Category name |
262 | - * @param string,... $categories Additional category names |
|
263 | 262 | * @return $this |
264 | 263 | */ |
265 | 264 | public function setAllowedFileCategories($category) { |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | * The callback can opt out of handling specific responses by returning NULL, |
534 | 534 | * in which case the default form behaviour will kick in. |
535 | 535 | * |
536 | - * @param $callback |
|
536 | + * @param \Closure $callback |
|
537 | 537 | * @return self |
538 | 538 | */ |
539 | 539 | public function setValidationResponseCallback($callback) { |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | /** |
594 | 594 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
595 | 595 | * |
596 | - * @param SS_List|array $fields |
|
596 | + * @param FieldList $fields |
|
597 | 597 | * @param callable $funcName |
598 | 598 | * @return FormField |
599 | 599 | */ |
@@ -734,6 +734,7 @@ discard block |
||
734 | 734 | * Set actions that are exempt from validation |
735 | 735 | * |
736 | 736 | * @param array |
737 | + * @param string[] $actions |
|
737 | 738 | * @return $this |
738 | 739 | */ |
739 | 740 | public function setValidationExemptActions($actions) { |
@@ -1131,7 +1132,7 @@ discard block |
||
1131 | 1132 | * If set to false (the default), then the form method is only used to construct the default |
1132 | 1133 | * form. |
1133 | 1134 | * |
1134 | - * @param $bool boolean |
|
1135 | + * @param boolean $bool boolean |
|
1135 | 1136 | * @return $this |
1136 | 1137 | */ |
1137 | 1138 | public function setStrictFormMethodCheck($bool) { |
@@ -89,6 +89,7 @@ |
||
89 | 89 | * Determines if the field should render open or closed by default. |
90 | 90 | * |
91 | 91 | * @param boolean |
92 | + * @param boolean $bool |
|
92 | 93 | */ |
93 | 94 | public function startClosed($bool) { |
94 | 95 | ($bool) ? $this->addExtraClass('startClosed') : $this->removeExtraClass('startClosed'); |
@@ -769,7 +769,6 @@ discard block |
||
769 | 769 | * Set the field value. |
770 | 770 | * |
771 | 771 | * @param mixed $value |
772 | - * @param null|array|DataObject $data {@see Form::loadDataFrom} |
|
773 | 772 | * @return $this |
774 | 773 | */ |
775 | 774 | public function setValue($value) { |
@@ -1188,7 +1187,7 @@ discard block |
||
1188 | 1187 | /** |
1189 | 1188 | * @param FormTransformation $transformation |
1190 | 1189 | * |
1191 | - * @return mixed |
|
1190 | + * @return FormField |
|
1192 | 1191 | */ |
1193 | 1192 | public function transform(FormTransformation $transformation) { |
1194 | 1193 | return $transformation->transform($this); |
@@ -1291,7 +1290,7 @@ discard block |
||
1291 | 1290 | * This function is used by the template processor. If you refer to a field as a $ variable, it |
1292 | 1291 | * will return the $Field value. |
1293 | 1292 | * |
1294 | - * @return string |
|
1293 | + * @return DBHTMLText |
|
1295 | 1294 | */ |
1296 | 1295 | public function forTemplate() { |
1297 | 1296 | return $this->Field(); |
@@ -200,7 +200,7 @@ |
||
200 | 200 | * |
201 | 201 | * @todo refactor this into GridFieldComponent |
202 | 202 | * |
203 | - * @param mixed $value |
|
203 | + * @param string $value |
|
204 | 204 | * @param string|array $castingDefinition |
205 | 205 | * |
206 | 206 | * @return mixed |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * |
144 | 144 | * @param GridField $gridField |
145 | - * @return array |
|
145 | + * @return string[] |
|
146 | 146 | */ |
147 | 147 | public function getActions($gridField) { |
148 | 148 | return array('addto', 'find'); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
276 | - * @param array $fields |
|
276 | + * @param string[] $fields |
|
277 | 277 | * @return $this |
278 | 278 | */ |
279 | 279 | public function setSearchFields($fields) { |
@@ -92,6 +92,9 @@ discard block |
||
92 | 92 | parent::__construct(); |
93 | 93 | } |
94 | 94 | |
95 | + /** |
|
96 | + * @param string $action |
|
97 | + */ |
|
95 | 98 | public function Link($action = null) |
96 | 99 | { |
97 | 100 | return Controller::join_links($this->gridField->Link('item'), |
@@ -339,6 +342,9 @@ discard block |
||
339 | 342 | return $c; |
340 | 343 | } |
341 | 344 | |
345 | + /** |
|
346 | + * @return string |
|
347 | + */ |
|
342 | 348 | protected function getBackLink() |
343 | 349 | { |
344 | 350 | // TODO Coupling with CMS |
@@ -446,6 +452,9 @@ discard block |
||
446 | 452 | } |
447 | 453 | } |
448 | 454 | |
455 | + /** |
|
456 | + * @param integer $errorCode |
|
457 | + */ |
|
449 | 458 | public function httpError($errorCode, $errorMessage = null) |
450 | 459 | { |
451 | 460 | $controller = $this->getToplevelController(); |