@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\ORM\SS_List; |
8 | 8 | use SilverStripe\ORM\ArrayList; |
9 | 9 | use SilverStripe\ORM\DataObjectInterface; |
10 | -use SilverStripe\View\Requirements; |
|
11 | 10 | use InvalidArgumentException; |
12 | 11 | |
13 | 12 | /** |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | /** |
205 | 205 | * Determine if the target folder for new uploads in is visible the field UI. |
206 | 206 | * |
207 | - * @return boolean |
|
207 | + * @return boolean|string |
|
208 | 208 | */ |
209 | 209 | public function canPreviewFolder() |
210 | 210 | { |
@@ -279,6 +279,10 @@ discard block |
||
279 | 279 | return $this->record; |
280 | 280 | } |
281 | 281 | |
282 | + /** |
|
283 | + * @param null|DataObject $value |
|
284 | + * @param DataObject $record |
|
285 | + */ |
|
282 | 286 | public function setValue($value, $record = null) |
283 | 287 | { |
284 | 288 | // Extract value from underlying record |
@@ -392,7 +396,7 @@ discard block |
||
392 | 396 | /** |
393 | 397 | * Determine if the user has permission to upload. |
394 | 398 | * |
395 | - * @return boolean |
|
399 | + * @return boolean|string |
|
396 | 400 | */ |
397 | 401 | public function canUpload() |
398 | 402 | { |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\ORM\SS_List; |
8 | 8 | use SilverStripe\ORM\ArrayList; |
9 | 9 | use SilverStripe\ORM\DataObjectInterface; |
10 | -use SilverStripe\View\Requirements; |
|
11 | 10 | use InvalidArgumentException; |
12 | 11 | |
13 | 12 | /** |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\ORM\SS_List; |
8 | 8 | use SilverStripe\ORM\ArrayList; |
9 | 9 | use SilverStripe\ORM\DataObjectInterface; |
10 | -use SilverStripe\View\Requirements; |
|
11 | 10 | use InvalidArgumentException; |
12 | 11 | |
13 | 12 | /** |
@@ -70,6 +70,10 @@ discard block |
||
70 | 70 | */ |
71 | 71 | protected $config; |
72 | 72 | |
73 | + /** |
|
74 | + * @param string $name |
|
75 | + * @param string $title |
|
76 | + */ |
|
73 | 77 | public function __construct($name, $title = null, $value = "") |
74 | 78 | { |
75 | 79 | $this->config = $this->config()->default_config; |
@@ -81,6 +85,9 @@ discard block |
||
81 | 85 | parent::__construct($name, $title, $value); |
82 | 86 | } |
83 | 87 | |
88 | + /** |
|
89 | + * @param Form $form |
|
90 | + */ |
|
84 | 91 | public function setForm($form) |
85 | 92 | { |
86 | 93 | parent::setForm($form); |
@@ -92,6 +99,9 @@ discard block |
||
92 | 99 | return $this; |
93 | 100 | } |
94 | 101 | |
102 | + /** |
|
103 | + * @param string $name |
|
104 | + */ |
|
95 | 105 | public function setName($name) |
96 | 106 | { |
97 | 107 | parent::setName($name); |
@@ -105,7 +115,7 @@ discard block |
||
105 | 115 | |
106 | 116 | /** |
107 | 117 | * @param array $properties |
108 | - * @return string |
|
118 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
109 | 119 | */ |
110 | 120 | public function FieldHolder($properties = array()) |
111 | 121 | { |
@@ -120,7 +130,7 @@ discard block |
||
120 | 130 | |
121 | 131 | /** |
122 | 132 | * @param array $properties |
123 | - * @return string |
|
133 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
124 | 134 | */ |
125 | 135 | public function Field($properties = array()) |
126 | 136 | { |
@@ -254,6 +264,9 @@ discard block |
||
254 | 264 | return $this; |
255 | 265 | } |
256 | 266 | |
267 | + /** |
|
268 | + * @param boolean $bool |
|
269 | + */ |
|
257 | 270 | public function setReadonly($bool) |
258 | 271 | { |
259 | 272 | parent::setReadonly($bool); |
@@ -354,7 +367,7 @@ discard block |
||
354 | 367 | * to set field-specific config options. |
355 | 368 | * |
356 | 369 | * @param string $name |
357 | - * @param mixed $val |
|
370 | + * @param string $val |
|
358 | 371 | * @return $this |
359 | 372 | */ |
360 | 373 | public function setConfig($name, $val) |
@@ -374,7 +387,7 @@ discard block |
||
374 | 387 | * to get field-specific config options. |
375 | 388 | * |
376 | 389 | * @param String $name Optional, returns the whole configuration array if empty |
377 | - * @return mixed |
|
390 | + * @return string |
|
378 | 391 | */ |
379 | 392 | public function getConfig($name = null) |
380 | 393 | { |
@@ -385,6 +398,9 @@ discard block |
||
385 | 398 | } |
386 | 399 | } |
387 | 400 | |
401 | + /** |
|
402 | + * @param RequiredFields $validator |
|
403 | + */ |
|
388 | 404 | public function validate($validator) |
389 | 405 | { |
390 | 406 | $dateValid = $this->dateField->validate($validator); |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use SilverStripe\ORM\DataQuery; |
6 | 6 | use SilverStripe\ORM\DB; |
7 | -use InvalidArgumentException; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Matches textual content with a LIKE '%keyword%' construct. |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | * The callback can opt out of handling specific responses by returning NULL, |
542 | 542 | * in which case the default form behaviour will kick in. |
543 | 543 | * |
544 | - * @param $callback |
|
544 | + * @param \Closure $callback |
|
545 | 545 | * @return self |
546 | 546 | */ |
547 | 547 | public function setValidationResponseCallback($callback) |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | /** |
604 | 604 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
605 | 605 | * |
606 | - * @param SS_List|array $fields |
|
606 | + * @param FieldList $fields |
|
607 | 607 | * @param callable $funcName |
608 | 608 | * @return FormField |
609 | 609 | */ |
@@ -755,6 +755,7 @@ discard block |
||
755 | 755 | * Set actions that are exempt from validation |
756 | 756 | * |
757 | 757 | * @param array |
758 | + * @param string[] $actions |
|
758 | 759 | * @return $this |
759 | 760 | */ |
760 | 761 | public function setValidationExemptActions($actions) |
@@ -1198,7 +1199,7 @@ discard block |
||
1198 | 1199 | * If set to false (the default), then the form method is only used to construct the default |
1199 | 1200 | * form. |
1200 | 1201 | * |
1201 | - * @param $bool boolean |
|
1202 | + * @param boolean $bool boolean |
|
1202 | 1203 | * @return $this |
1203 | 1204 | */ |
1204 | 1205 | public function setStrictFormMethodCheck($bool) |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use SilverStripe\ORM\DataQuery; |
6 | 6 | use SilverStripe\ORM\DB; |
7 | -use InvalidArgumentException; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Matches textual content with a LIKE '%keyword%' construct. |
@@ -807,7 +807,6 @@ discard block |
||
807 | 807 | * Set the field value. |
808 | 808 | * |
809 | 809 | * @param mixed $value |
810 | - * @param null|array|DataObject $data {@see Form::loadDataFrom} |
|
811 | 810 | * @return $this |
812 | 811 | */ |
813 | 812 | public function setValue($value) |
@@ -1251,7 +1250,7 @@ discard block |
||
1251 | 1250 | /** |
1252 | 1251 | * @param FormTransformation $transformation |
1253 | 1252 | * |
1254 | - * @return mixed |
|
1253 | + * @return FormField |
|
1255 | 1254 | */ |
1256 | 1255 | public function transform(FormTransformation $transformation) |
1257 | 1256 | { |
@@ -1362,7 +1361,7 @@ discard block |
||
1362 | 1361 | * This function is used by the template processor. If you refer to a field as a $ variable, it |
1363 | 1362 | * will return the $Field value. |
1364 | 1363 | * |
1365 | - * @return string |
|
1364 | + * @return DBHTMLText |
|
1366 | 1365 | */ |
1367 | 1366 | public function forTemplate() |
1368 | 1367 | { |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\ORM\SS_List; |
8 | 8 | use SilverStripe\ORM\ArrayList; |
9 | 9 | use SilverStripe\ORM\DataObjectInterface; |
10 | -use SilverStripe\View\Requirements; |
|
11 | 10 | use InvalidArgumentException; |
12 | 11 | |
13 | 12 | /** |
@@ -228,7 +228,7 @@ |
||
228 | 228 | * |
229 | 229 | * @todo refactor this into GridFieldComponent |
230 | 230 | * |
231 | - * @param mixed $value |
|
231 | + * @param string $value |
|
232 | 232 | * @param string|array $castingDefinition |
233 | 233 | * |
234 | 234 | * @return mixed |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use DOMAttr; |
6 | 6 | use DOMElement; |
7 | -use DOMNode; |
|
8 | 7 | use SilverStripe\Core\Injector\Injectable; |
9 | 8 | use SilverStripe\View\Parsers\HTMLValue; |
10 | 9 | use stdClass; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match |
54 | 54 | * |
55 | - * @param $str - The TinyMCE pattern |
|
55 | + * @param string|null $str - The TinyMCE pattern |
|
56 | 56 | * @return string - The equivalent regex |
57 | 57 | */ |
58 | 58 | protected function patternToRegex($str) |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace SilverStripe\Forms; |
4 | 4 | |
5 | -use SilverStripe\View\Requirements; |
|
6 | - |
|
7 | 5 | /** |
8 | 6 | * Render a button that will submit the form its contained in through ajax. |
9 | 7 | * |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\ORM\SS_List; |
8 | 8 | use SilverStripe\ORM\ArrayList; |
9 | 9 | use SilverStripe\ORM\DataObjectInterface; |
10 | -use SilverStripe\View\Requirements; |
|
11 | 10 | use InvalidArgumentException; |
12 | 11 | |
13 | 12 | /** |