@@ -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) { |
@@ -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( |
@@ -470,11 +470,17 @@ discard block |
||
| 470 | 470 | |
| 471 | 471 | protected $extraConfigSources = array(); |
| 472 | 472 | |
| 473 | + /** |
|
| 474 | + * @param string $class |
|
| 475 | + */ |
|
| 473 | 476 | public function extraConfigSourcesChanged($class) { |
| 474 | 477 | unset($this->extraConfigSources[$class]); |
| 475 | 478 | $this->cache->clean("__{$class}"); |
| 476 | 479 | } |
| 477 | 480 | |
| 481 | + /** |
|
| 482 | + * @param integer $sourceOptions |
|
| 483 | + */ |
|
| 478 | 484 | protected function getUncached($class, $name, $sourceOptions, &$result, $suppress, &$tags) { |
| 479 | 485 | $tags[] = "__{$class}"; |
| 480 | 486 | $tags[] = "__{$class}__{$name}"; |
@@ -604,7 +610,7 @@ discard block |
||
| 604 | 610 | * |
| 605 | 611 | * @param string $class The class to update a configuration value for |
| 606 | 612 | * @param string $name The configuration property name to update |
| 607 | - * @param mixed $value The value to update with |
|
| 613 | + * @param mixed $val The value to update with |
|
| 608 | 614 | * |
| 609 | 615 | * Arrays are recursively merged into current configuration as "latest" - for associative arrays the passed value |
| 610 | 616 | * replaces any item with the same key, for sequential arrays the items are placed at the end of the array, for |
@@ -728,6 +734,10 @@ discard block |
||
| 728 | 734 | $this->cache = $cloned; |
| 729 | 735 | } |
| 730 | 736 | |
| 737 | + /** |
|
| 738 | + * @param integer $key |
|
| 739 | + * @param integer $val |
|
| 740 | + */ |
|
| 731 | 741 | public function set($key, $val, $tags = array()) { |
| 732 | 742 | // Find an index to set at |
| 733 | 743 | $replacing = null; |
@@ -796,6 +806,9 @@ discard block |
||
| 796 | 806 | } |
| 797 | 807 | } |
| 798 | 808 | |
| 809 | + /** |
|
| 810 | + * @param string $tag |
|
| 811 | + */ |
|
| 799 | 812 | public function clean($tag = null) { |
| 800 | 813 | if ($tag) { |
| 801 | 814 | foreach ($this->cache as $i => $v) { |
@@ -827,6 +840,10 @@ discard block |
||
| 827 | 840 | $this->cache = array(); |
| 828 | 841 | } |
| 829 | 842 | |
| 843 | + /** |
|
| 844 | + * @param integer $key |
|
| 845 | + * @param integer $val |
|
| 846 | + */ |
|
| 830 | 847 | public function set($key, $val, $tags = array()) { |
| 831 | 848 | foreach($tags as $t) { |
| 832 | 849 | if(!isset($this->tags[$t])) { |
@@ -845,6 +862,9 @@ discard block |
||
| 845 | 862 | return $this->miss ? ($this->hit / $this->miss) : 0; |
| 846 | 863 | } |
| 847 | 864 | |
| 865 | + /** |
|
| 866 | + * @param integer $key |
|
| 867 | + */ |
|
| 848 | 868 | public function get($key) { |
| 849 | 869 | list($hit, $result) = $this->checkAndGet($key); |
| 850 | 870 | return $hit ? $result : false; |
@@ -864,6 +884,9 @@ discard block |
||
| 864 | 884 | } |
| 865 | 885 | } |
| 866 | 886 | |
| 887 | + /** |
|
| 888 | + * @param string $tag |
|
| 889 | + */ |
|
| 867 | 890 | public function clean($tag = null) { |
| 868 | 891 | if($tag) { |
| 869 | 892 | if(isset($this->tags[$tag])) { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * @param string $tabName The name of the tab or tabset. Subtabs can be referred to as TabSet.Tab |
| 134 | 134 | * or TabSet.Tab.Subtab. This function will create any missing tabs. |
| 135 | 135 | * @param array $fields An array of {@link FormField} objects. |
| 136 | - * @param string $name Name of the field to insert before (optional) |
|
| 136 | + * @param string $insertBefore |
|
| 137 | 137 | */ |
| 138 | 138 | public function addFieldsToTab($tabName, $fields, $insertBefore = null) { |
| 139 | 139 | $this->flushFieldsCache(); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * Removes a number of fields from a Tab/TabSet within this FieldList. |
| 174 | 174 | * |
| 175 | 175 | * @param string $tabName The name of the Tab or TabSet field |
| 176 | - * @param array $fields A list of fields, e.g. array('Name', 'Email') |
|
| 176 | + * @param string[] $fields A list of fields, e.g. array('Name', 'Email') |
|
| 177 | 177 | */ |
| 178 | 178 | public function removeFieldsFromTab($tabName, $fields) { |
| 179 | 179 | $this->flushFieldsCache(); |
@@ -453,6 +453,7 @@ discard block |
||
| 453 | 453 | |
| 454 | 454 | /** |
| 455 | 455 | * Handler method called before the FieldList is going to be manipulated. |
| 456 | + * @param FormField $item |
|
| 456 | 457 | */ |
| 457 | 458 | protected function onBeforeInsert($item) { |
| 458 | 459 | $this->flushFieldsCache(); |
@@ -525,6 +526,7 @@ discard block |
||
| 525 | 526 | * Transform this FieldList with a given tranform method, |
| 526 | 527 | * e.g. $this->transform(new ReadonlyTransformation()) |
| 527 | 528 | * |
| 529 | + * @param ReadonlyTransformation $trans |
|
| 528 | 530 | * @return FieldList |
| 529 | 531 | */ |
| 530 | 532 | public function transform($trans) { |
@@ -544,6 +546,9 @@ discard block |
||
| 544 | 546 | else return $this; |
| 545 | 547 | } |
| 546 | 548 | |
| 549 | + /** |
|
| 550 | + * @param CompositeField $field |
|
| 551 | + */ |
|
| 547 | 552 | public function setContainerField($field) { |
| 548 | 553 | $this->containerField = $field; |
| 549 | 554 | return $this; |
@@ -562,6 +567,7 @@ discard block |
||
| 562 | 567 | * Transform the named field into a readonly feld. |
| 563 | 568 | * |
| 564 | 569 | * @param string|FormField |
| 570 | + * @param string $field |
|
| 565 | 571 | */ |
| 566 | 572 | public function makeFieldReadonly($field) { |
| 567 | 573 | $fieldName = ($field instanceof FormField) ? $field->getName() : $field; |
@@ -616,6 +622,7 @@ discard block |
||
| 616 | 622 | * the children collection. Doesn't work recursively. |
| 617 | 623 | * |
| 618 | 624 | * @param string|FormField |
| 625 | + * @param string $field |
|
| 619 | 626 | * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't |
| 620 | 627 | * be found. |
| 621 | 628 | */ |
@@ -540,6 +540,7 @@ discard block |
||
| 540 | 540 | * |
| 541 | 541 | * Caution: this doesn't work on all fields, see {@link setAttribute()}. |
| 542 | 542 | * |
| 543 | + * @param string $name |
|
| 543 | 544 | * @return null|string |
| 544 | 545 | */ |
| 545 | 546 | public function getAttribute($name) { |
@@ -1201,7 +1202,7 @@ discard block |
||
| 1201 | 1202 | * |
| 1202 | 1203 | * @param FieldList $containerFieldList |
| 1203 | 1204 | * |
| 1204 | - * @return FieldList |
|
| 1205 | + * @return FormField |
|
| 1205 | 1206 | */ |
| 1206 | 1207 | public function setContainerFieldList($containerFieldList) { |
| 1207 | 1208 | $this->containerFieldList = $containerFieldList; |
@@ -70,6 +70,7 @@ |
||
| 70 | 70 | /** |
| 71 | 71 | * Get the DisplayFields |
| 72 | 72 | * |
| 73 | + * @param GridField $gridField |
|
| 73 | 74 | * @return array |
| 74 | 75 | * @see GridFieldDataColumns::setDisplayFields |
| 75 | 76 | */ |
@@ -29,6 +29,7 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * By default, this is set to true so that it's clearer what's happening, but the predefined |
| 31 | 31 | * {@link GridFieldConfig} subclasses set this to false for flexibility. |
| 32 | + * @param boolean $throwExceptionOnBadDataType |
|
| 32 | 33 | */ |
| 33 | 34 | public function setThrowExceptionOnBadDataType($throwExceptionOnBadDataType) { |
| 34 | 35 | $this->throwExceptionOnBadDataType = $throwExceptionOnBadDataType; |
@@ -44,6 +45,7 @@ discard block |
||
| 44 | 45 | /** |
| 45 | 46 | * Check that this dataList is of the right data type. |
| 46 | 47 | * Returns false if it's a bad data type, and if appropriate, throws an exception. |
| 48 | + * @param SS_List $dataList |
|
| 47 | 49 | */ |
| 48 | 50 | protected function checkDataType($dataList) { |
| 49 | 51 | if($dataList instanceof SS_Sortable) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match |
| 41 | 41 | * |
| 42 | - * @param $str - The TinyMCE pattern |
|
| 42 | + * @param string|null $str - The TinyMCE pattern |
|
| 43 | 43 | * @return string - The equivalent regex |
| 44 | 44 | */ |
| 45 | 45 | protected function patternToRegex($str) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | /** |
| 182 | 182 | * Given an attribute name, return the rule structure for that attribute |
| 183 | 183 | * |
| 184 | - * @param object $elementRule |
|
| 184 | + * @param stdClass $elementRule |
|
| 185 | 185 | * @param string $name The attribute name |
| 186 | 186 | * @return stdClass The attribute rule |
| 187 | 187 | */ |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @param string $name the field name |
| 85 | 85 | * @param string $title the field label |
| 86 | - * @param string|array $sourceObject The object-type to list in the tree. This could |
|
| 86 | + * @param string $sourceObject The object-type to list in the tree. This could |
|
| 87 | 87 | * be one of the following: |
| 88 | 88 | * - A DataObject class name with the {@link Hierarchy} extension. |
| 89 | 89 | * - An array of key/value pairs, like a {@link DropdownField} source. In |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | /** |
| 214 | - * @return HTMLText |
|
| 214 | + * @return string |
|
| 215 | 215 | */ |
| 216 | 216 | public function Field($properties = array()) { |
| 217 | 217 | Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang'); |
@@ -446,7 +446,6 @@ discard block |
||
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | /** |
| 449 | - * @param string $field |
|
| 450 | 449 | * @return $this |
| 451 | 450 | */ |
| 452 | 451 | public function setSourceObject($class) { |