@@ -59,6 +59,10 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | protected $config; |
| 61 | 61 | |
| 62 | + /** |
|
| 63 | + * @param string $name |
|
| 64 | + * @param string $title |
|
| 65 | + */ |
|
| 62 | 66 | public function __construct($name, $title = null, $value = ""){ |
| 63 | 67 | $this->config = $this->config()->default_config; |
| 64 | 68 | |
@@ -71,6 +75,9 @@ discard block |
||
| 71 | 75 | parent::__construct($name, $title, $value); |
| 72 | 76 | } |
| 73 | 77 | |
| 78 | + /** |
|
| 79 | + * @param Form $form |
|
| 80 | + */ |
|
| 74 | 81 | public function setForm($form) { |
| 75 | 82 | parent::setForm($form); |
| 76 | 83 | |
@@ -81,6 +88,9 @@ discard block |
||
| 81 | 88 | return $this; |
| 82 | 89 | } |
| 83 | 90 | |
| 91 | + /** |
|
| 92 | + * @param string $name |
|
| 93 | + */ |
|
| 84 | 94 | public function setName($name) { |
| 85 | 95 | parent::setName($name); |
| 86 | 96 | |
@@ -93,7 +103,7 @@ discard block |
||
| 93 | 103 | |
| 94 | 104 | /** |
| 95 | 105 | * @param array $properties |
| 96 | - * @return HTMLText |
|
| 106 | + * @return string |
|
| 97 | 107 | */ |
| 98 | 108 | public function FieldHolder($properties = array()) { |
| 99 | 109 | $config = array( |
@@ -108,7 +118,7 @@ discard block |
||
| 108 | 118 | |
| 109 | 119 | /** |
| 110 | 120 | * @param array $properties |
| 111 | - * @return HTMLText |
|
| 121 | + * @return DBField |
|
| 112 | 122 | */ |
| 113 | 123 | public function Field($properties = array()) { |
| 114 | 124 | Requirements::css(FRAMEWORK_DIR . '/css/DatetimeField.css'); |
@@ -243,6 +253,7 @@ discard block |
||
| 243 | 253 | |
| 244 | 254 | /** |
| 245 | 255 | * @param FormField |
| 256 | + * @param DateField $field |
|
| 246 | 257 | */ |
| 247 | 258 | public function setDateField($field) { |
| 248 | 259 | $expected = $this->getName() . '[date]'; |
@@ -268,6 +279,7 @@ discard block |
||
| 268 | 279 | |
| 269 | 280 | /** |
| 270 | 281 | * @param FormField |
| 282 | + * @param TimeField $field |
|
| 271 | 283 | */ |
| 272 | 284 | public function setTimeField($field) { |
| 273 | 285 | $expected = $this->getName() . '[time]'; |
@@ -306,7 +318,7 @@ discard block |
||
| 306 | 318 | * to set field-specific config options. |
| 307 | 319 | * |
| 308 | 320 | * @param string $name |
| 309 | - * @param mixed $val |
|
| 321 | + * @param string $val |
|
| 310 | 322 | */ |
| 311 | 323 | public function setConfig($name, $val) { |
| 312 | 324 | $this->config[$name] = $val; |
@@ -324,7 +336,7 @@ discard block |
||
| 324 | 336 | * to get field-specific config options. |
| 325 | 337 | * |
| 326 | 338 | * @param String $name Optional, returns the whole configuration array if empty |
| 327 | - * @return mixed |
|
| 339 | + * @return string |
|
| 328 | 340 | */ |
| 329 | 341 | public function getConfig($name = null) { |
| 330 | 342 | if($name) { |
@@ -334,6 +346,9 @@ discard block |
||
| 334 | 346 | } |
| 335 | 347 | } |
| 336 | 348 | |
| 349 | + /** |
|
| 350 | + * @param RequiredFields $validator |
|
| 351 | + */ |
|
| 337 | 352 | public function validate($validator) { |
| 338 | 353 | $dateValid = $this->dateField->validate($validator); |
| 339 | 354 | $timeValid = $this->timeField->validate($validator); |
@@ -118,6 +118,7 @@ discard block |
||
| 118 | 118 | * or TabSet.Tab.Subtab. |
| 119 | 119 | * This function will create any missing tabs. |
| 120 | 120 | * @param array $fields An array of {@link FormField} objects. |
| 121 | + * @param string $insertBefore |
|
| 121 | 122 | */ |
| 122 | 123 | public function addFieldsToTab($tabName, $fields, $insertBefore = null) { |
| 123 | 124 | $this->flushFieldsCache(); |
@@ -157,7 +158,7 @@ discard block |
||
| 157 | 158 | * Removes a number of fields from a Tab/TabSet within this FieldList. |
| 158 | 159 | * |
| 159 | 160 | * @param string $tabName The name of the Tab or TabSet field |
| 160 | - * @param array $fields A list of fields, e.g. array('Name', 'Email') |
|
| 161 | + * @param string[] $fields A list of fields, e.g. array('Name', 'Email') |
|
| 161 | 162 | */ |
| 162 | 163 | public function removeFieldsFromTab($tabName, $fields) { |
| 163 | 164 | $this->flushFieldsCache(); |
@@ -426,6 +427,7 @@ discard block |
||
| 426 | 427 | |
| 427 | 428 | /** |
| 428 | 429 | * Handler method called before the FieldList is going to be manipulated. |
| 430 | + * @param FormField $item |
|
| 429 | 431 | */ |
| 430 | 432 | protected function onBeforeInsert($item) { |
| 431 | 433 | $this->flushFieldsCache(); |
@@ -498,6 +500,7 @@ discard block |
||
| 498 | 500 | * Transform this FieldList with a given tranform method, |
| 499 | 501 | * e.g. $this->transform(new ReadonlyTransformation()) |
| 500 | 502 | * |
| 503 | + * @param ReadonlyTransformation $trans |
|
| 501 | 504 | * @return FieldList |
| 502 | 505 | */ |
| 503 | 506 | public function transform($trans) { |
@@ -517,6 +520,9 @@ discard block |
||
| 517 | 520 | else return $this; |
| 518 | 521 | } |
| 519 | 522 | |
| 523 | + /** |
|
| 524 | + * @param CompositeField $field |
|
| 525 | + */ |
|
| 520 | 526 | public function setContainerField($field) { |
| 521 | 527 | $this->containerField = $field; |
| 522 | 528 | return $this; |
@@ -535,6 +541,7 @@ discard block |
||
| 535 | 541 | * Transform the named field into a readonly feld. |
| 536 | 542 | * |
| 537 | 543 | * @param string|FormField |
| 544 | + * @param string $field |
|
| 538 | 545 | */ |
| 539 | 546 | public function makeFieldReadonly($field) { |
| 540 | 547 | $fieldName = ($field instanceof FormField) ? $field->getName() : $field; |
@@ -584,6 +591,7 @@ discard block |
||
| 584 | 591 | * the children collection. Doesn't work recursively. |
| 585 | 592 | * |
| 586 | 593 | * @param string|FormField |
| 594 | + * @param string $field |
|
| 587 | 595 | * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't |
| 588 | 596 | * be found. |
| 589 | 597 | */ |
@@ -631,7 +639,7 @@ discard block |
||
| 631 | 639 | * Support function for backwards compatibility purposes. |
| 632 | 640 | * Caution: Volatile API, might be removed in 3.1 or later. |
| 633 | 641 | * |
| 634 | - * @param String $tabname Path to a tab, e.g. "Root.Content.Main" |
|
| 642 | + * @param String $name Path to a tab, e.g. "Root.Content.Main" |
|
| 635 | 643 | * @return String Rewritten path, based on {@link tabPathRewrites} |
| 636 | 644 | */ |
| 637 | 645 | protected function rewriteTabPath($name) { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * @param array $properties |
| 88 | - * @return HTMLText |
|
| 88 | + * @return string |
|
| 89 | 89 | */ |
| 90 | 90 | public function Field($properties = array()) { |
| 91 | 91 | $properties = array_merge($properties, array( |
@@ -249,7 +249,6 @@ discard block |
||
| 249 | 249 | * for each of these categories |
| 250 | 250 | * |
| 251 | 251 | * @param string $category Category name |
| 252 | - * @param string,... $categories Additional category names |
|
| 253 | 252 | * @return $this |
| 254 | 253 | */ |
| 255 | 254 | public function setAllowedFileCategories($category) { |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | /** |
| 525 | 525 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
| 526 | 526 | * |
| 527 | - * @param SS_List|array $fields |
|
| 527 | + * @param FieldList|null $fields |
|
| 528 | 528 | * @param callable $funcName |
| 529 | 529 | * @return FormField |
| 530 | 530 | */ |
@@ -663,6 +663,7 @@ discard block |
||
| 663 | 663 | * Set actions that are exempt from validation |
| 664 | 664 | * |
| 665 | 665 | * @param array |
| 666 | + * @param string[] $actions |
|
| 666 | 667 | */ |
| 667 | 668 | public function setValidationExemptActions($actions) { |
| 668 | 669 | $this->validationExemptActions = $actions; |
@@ -802,6 +803,7 @@ discard block |
||
| 802 | 803 | } |
| 803 | 804 | |
| 804 | 805 | /** |
| 806 | + * @param string $name |
|
| 805 | 807 | * @return string $name |
| 806 | 808 | */ |
| 807 | 809 | public function getAttribute($name) { |
@@ -836,6 +838,7 @@ discard block |
||
| 836 | 838 | * |
| 837 | 839 | * @param array Custom attributes to process. Falls back to {@link getAttributes()}. |
| 838 | 840 | * If at least one argument is passed as a string, all arguments act as excludes by name. |
| 841 | + * @param string $attrs |
|
| 839 | 842 | * |
| 840 | 843 | * @return string HTML attributes, ready for insertion into an HTML tag |
| 841 | 844 | */ |
@@ -1043,7 +1046,7 @@ discard block |
||
| 1043 | 1046 | * If set to false (the default), then the form method is only used to construct the default |
| 1044 | 1047 | * form. |
| 1045 | 1048 | * |
| 1046 | - * @param $bool boolean |
|
| 1049 | + * @param boolean $bool boolean |
|
| 1047 | 1050 | * @return $this |
| 1048 | 1051 | */ |
| 1049 | 1052 | public function setStrictFormMethodCheck($bool) { |
@@ -1546,7 +1549,7 @@ discard block |
||
| 1546 | 1549 | * This is returned when you access a form as $FormObject rather |
| 1547 | 1550 | * than <% with FormObject %> |
| 1548 | 1551 | * |
| 1549 | - * @return HTML |
|
| 1552 | + * @return DBField |
|
| 1550 | 1553 | */ |
| 1551 | 1554 | public function forTemplate() { |
| 1552 | 1555 | $return = $this->renderWith(array_merge( |
@@ -1566,7 +1569,7 @@ discard block |
||
| 1566 | 1569 | * It triggers slightly different behaviour, such as disabling the rewriting |
| 1567 | 1570 | * of # links. |
| 1568 | 1571 | * |
| 1569 | - * @return HTML |
|
| 1572 | + * @return DBField |
|
| 1570 | 1573 | */ |
| 1571 | 1574 | public function forAjaxTemplate() { |
| 1572 | 1575 | $view = new SSViewer(array( |
@@ -1589,7 +1592,7 @@ discard block |
||
| 1589 | 1592 | * and _form_enctype. These are the attributes of the form. These fields |
| 1590 | 1593 | * can be used to send the form to Ajax. |
| 1591 | 1594 | * |
| 1592 | - * @return HTML |
|
| 1595 | + * @return string |
|
| 1593 | 1596 | */ |
| 1594 | 1597 | public function formHtmlContent() { |
| 1595 | 1598 | $this->IncludeFormTag = false; |
@@ -1850,6 +1853,9 @@ discard block |
||
| 1850 | 1853 | |
| 1851 | 1854 | protected $form; |
| 1852 | 1855 | |
| 1856 | + /** |
|
| 1857 | + * @param Form $form |
|
| 1858 | + */ |
|
| 1853 | 1859 | public function __construct($form) { |
| 1854 | 1860 | $this->form = $form; |
| 1855 | 1861 | parent::__construct(); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * @param array $properties |
| 79 | - * @return HTMLText |
|
| 79 | + * @return string |
|
| 80 | 80 | */ |
| 81 | 81 | public function Field($properties = array()) { |
| 82 | 82 | $properties = array_merge( |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * @param array $properties |
| 96 | - * @return HTMLText |
|
| 96 | + * @return string |
|
| 97 | 97 | */ |
| 98 | 98 | public function FieldHolder($properties = array()) { |
| 99 | 99 | return $this->Field($properties); |
@@ -157,6 +157,7 @@ discard block |
||
| 157 | 157 | * Enable or disable the rendering of this action as a <button /> |
| 158 | 158 | * |
| 159 | 159 | * @param boolean |
| 160 | + * @param boolean $bool |
|
| 160 | 161 | * @return $this |
| 161 | 162 | */ |
| 162 | 163 | public function setUseButtonTag($bool) { |
@@ -532,6 +532,7 @@ discard block |
||
| 532 | 532 | * |
| 533 | 533 | * Caution: this doesn't work on all fields, see {@link setAttribute()}. |
| 534 | 534 | * |
| 535 | + * @param string $name |
|
| 535 | 536 | * @return null|string |
| 536 | 537 | */ |
| 537 | 538 | public function getAttribute($name) { |
@@ -643,7 +644,6 @@ discard block |
||
| 643 | 644 | * Set the field value. |
| 644 | 645 | * |
| 645 | 646 | * @param mixed $value |
| 646 | - * @param null|array|DataObject $data {@see Form::loadDataFrom} |
|
| 647 | 647 | * |
| 648 | 648 | * @return $this |
| 649 | 649 | */ |
@@ -1116,6 +1116,7 @@ discard block |
||
| 1116 | 1116 | * @todo Make this abstract. |
| 1117 | 1117 | * |
| 1118 | 1118 | * @param Validator |
| 1119 | + * @param RequiredFields $validator |
|
| 1119 | 1120 | * |
| 1120 | 1121 | * @return bool |
| 1121 | 1122 | */ |
@@ -1185,7 +1186,7 @@ discard block |
||
| 1185 | 1186 | * |
| 1186 | 1187 | * @param FieldList $containerFieldList |
| 1187 | 1188 | * |
| 1188 | - * @return FieldList |
|
| 1189 | + * @return FormField |
|
| 1189 | 1190 | */ |
| 1190 | 1191 | public function setContainerFieldList($containerFieldList) { |
| 1191 | 1192 | $this->containerFieldList = $containerFieldList; |
@@ -49,7 +49,6 @@ |
||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @param DataObject $obj |
| 52 | - * @param array $params |
|
| 53 | 52 | */ |
| 54 | 53 | public function __construct($obj) { |
| 55 | 54 | $this->obj = $obj; |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | * |
| 200 | 200 | * @todo refactor this into GridFieldComponent |
| 201 | 201 | * |
| 202 | - * @param mixed $value |
|
| 202 | + * @param string $value |
|
| 203 | 203 | * @param string|array $castingDefinition |
| 204 | 204 | * |
| 205 | 205 | * @return mixed |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | * |
| 287 | 287 | * @param array $properties |
| 288 | 288 | * |
| 289 | - * @return HTMLText |
|
| 289 | + * @return DBField |
|
| 290 | 290 | */ |
| 291 | 291 | public function FieldHolder($properties = array()) { |
| 292 | 292 | Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | * @param int $index |
| 572 | 572 | * @param DataObject $record |
| 573 | 573 | * |
| 574 | - * @return array |
|
| 574 | + * @return string[] |
|
| 575 | 575 | */ |
| 576 | 576 | protected function newRowClasses($total, $index, $record) { |
| 577 | 577 | $classes = array('ss-gridfield-item'); |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | /** |
| 597 | 597 | * @param array $properties |
| 598 | 598 | * |
| 599 | - * @return HTMLText |
|
| 599 | + * @return DBField |
|
| 600 | 600 | */ |
| 601 | 601 | public function Field($properties = array()) { |
| 602 | 602 | return $this->FieldHolder($properties); |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | /** |
| 130 | 130 | * |
| 131 | 131 | * @param GridField $gridField |
| 132 | - * @return array |
|
| 132 | + * @return string[] |
|
| 133 | 133 | */ |
| 134 | 134 | public function getActions($gridField) { |
| 135 | 135 | return array('addto'); |