@@ -369,7 +369,7 @@ |
||
| 369 | 369 | * |
| 370 | 370 | * @param string $method the method name to call |
| 371 | 371 | * @param mixed $a1 |
| 372 | - * @param mixed $a2 |
|
| 372 | + * @param string $a2 |
|
| 373 | 373 | * @param mixed $a3 |
| 374 | 374 | * @param mixed $a4 |
| 375 | 375 | * @param mixed $a5 |
@@ -23,8 +23,6 @@ discard block |
||
| 23 | 23 | * $list = DataList::create('SiteTree'); |
| 24 | 24 | * $list = SiteTree::get(); |
| 25 | 25 | * |
| 26 | - * @param string $class the class name |
|
| 27 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
| 28 | 26 | * @return static |
| 29 | 27 | */ |
| 30 | 28 | public static function create() { |
@@ -47,7 +45,6 @@ discard block |
||
| 47 | 45 | * way to access instance methods which don't rely on instance |
| 48 | 46 | * data (e.g. the custom SilverStripe static handling). |
| 49 | 47 | * |
| 50 | - * @param string $className Optional classname (if called on Object directly) |
|
| 51 | 48 | * @return static The singleton instance |
| 52 | 49 | */ |
| 53 | 50 | public static function singleton() { |
@@ -37,6 +37,9 @@ discard block |
||
| 37 | 37 | ] |
| 38 | 38 | ); |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $root |
|
| 42 | + */ |
|
| 40 | 43 | public function __construct($root = null, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS) { |
| 41 | 44 | // Get root path |
| 42 | 45 | $root = $this->findRoot($root); |
@@ -117,7 +120,7 @@ discard block |
||
| 117 | 120 | * Render server configuration file from a template file |
| 118 | 121 | * |
| 119 | 122 | * @param string $template |
| 120 | - * @return \HTMLText Rendered results |
|
| 123 | + * @return string Rendered results |
|
| 121 | 124 | */ |
| 122 | 125 | protected function renderTemplate($template) { |
| 123 | 126 | // Build allowed extensions |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * Provide secure downloadable |
| 43 | 43 | * |
| 44 | 44 | * @param string $path |
| 45 | - * @return string|null |
|
| 45 | + * @return string |
|
| 46 | 46 | */ |
| 47 | 47 | public function getProtectedUrl($path) { |
| 48 | 48 | // Public URLs are handled via a request handler within /assets. |
@@ -510,7 +510,7 @@ |
||
| 510 | 510 | /** |
| 511 | 511 | * Get HTML for img containing the icon for this file |
| 512 | 512 | * |
| 513 | - * @return type |
|
| 513 | + * @return DBField |
|
| 514 | 514 | */ |
| 515 | 515 | public function IconTag() { |
| 516 | 516 | return DBField::create_field( |
@@ -6,13 +6,11 @@ |
||
| 6 | 6 | use SilverStripe\Filesystem\Storage\AssetContainer; |
| 7 | 7 | use SilverStripe\Filesystem\Storage\AssetStore; |
| 8 | 8 | use SilverStripe\Model\FieldType\DBComposite; |
| 9 | - |
|
| 10 | 9 | use Injector; |
| 11 | 10 | use AssetField; |
| 12 | 11 | use File; |
| 13 | 12 | use Director; |
| 14 | 13 | use Permission; |
| 15 | -use ShortcodeHandler; |
|
| 16 | 14 | use ValidationResult; |
| 17 | 15 | use ValidationException; |
| 18 | 16 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * Set a different instance than {@link Upload_Validator} |
| 115 | 115 | * for this upload session. |
| 116 | 116 | * |
| 117 | - * @param object $validator |
|
| 117 | + * @param Upload_Validator $validator |
|
| 118 | 118 | */ |
| 119 | 119 | public function setValidator($validator) { |
| 120 | 120 | $this->validator = $validator; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | /** |
| 364 | 364 | * Determines wether previous operations caused an error. |
| 365 | 365 | * |
| 366 | - * @return boolean |
|
| 366 | + * @return integer |
|
| 367 | 367 | */ |
| 368 | 368 | public function isError() { |
| 369 | 369 | return (count($this->errors)); |
@@ -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(); |
@@ -440,6 +441,7 @@ discard block |
||
| 440 | 441 | |
| 441 | 442 | /** |
| 442 | 443 | * Handler method called before the FieldList is going to be manipulated. |
| 444 | + * @param FormField $item |
|
| 443 | 445 | */ |
| 444 | 446 | protected function onBeforeInsert($item) { |
| 445 | 447 | $this->flushFieldsCache(); |
@@ -512,6 +514,7 @@ discard block |
||
| 512 | 514 | * Transform this FieldList with a given tranform method, |
| 513 | 515 | * e.g. $this->transform(new ReadonlyTransformation()) |
| 514 | 516 | * |
| 517 | + * @param ReadonlyTransformation $trans |
|
| 515 | 518 | * @return FieldList |
| 516 | 519 | */ |
| 517 | 520 | public function transform($trans) { |
@@ -531,6 +534,9 @@ discard block |
||
| 531 | 534 | else return $this; |
| 532 | 535 | } |
| 533 | 536 | |
| 537 | + /** |
|
| 538 | + * @param CompositeField $field |
|
| 539 | + */ |
|
| 534 | 540 | public function setContainerField($field) { |
| 535 | 541 | $this->containerField = $field; |
| 536 | 542 | return $this; |
@@ -549,6 +555,7 @@ discard block |
||
| 549 | 555 | * Transform the named field into a readonly feld. |
| 550 | 556 | * |
| 551 | 557 | * @param string|FormField |
| 558 | + * @param string $field |
|
| 552 | 559 | */ |
| 553 | 560 | public function makeFieldReadonly($field) { |
| 554 | 561 | $fieldName = ($field instanceof FormField) ? $field->getName() : $field; |
@@ -598,6 +605,7 @@ discard block |
||
| 598 | 605 | * the children collection. Doesn't work recursively. |
| 599 | 606 | * |
| 600 | 607 | * @param string|FormField |
| 608 | + * @param string $field |
|
| 601 | 609 | * @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't |
| 602 | 610 | * be found. |
| 603 | 611 | */ |
@@ -645,7 +653,7 @@ discard block |
||
| 645 | 653 | * Support function for backwards compatibility purposes. |
| 646 | 654 | * Caution: Volatile API, might be removed in 3.1 or later. |
| 647 | 655 | * |
| 648 | - * @param String $tabname Path to a tab, e.g. "Root.Content.Main" |
|
| 656 | + * @param string $name Path to a tab, e.g. "Root.Content.Main" |
|
| 649 | 657 | * @return String Rewritten path, based on {@link tabPathRewrites} |
| 650 | 658 | */ |
| 651 | 659 | protected function rewriteTabPath($name) { |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | * The callback can opt out of handling specific responses by returning NULL, |
| 499 | 499 | * in which case the default form behaviour will kick in. |
| 500 | 500 | * |
| 501 | - * @param $callback |
|
| 501 | + * @param Closure $callback |
|
| 502 | 502 | * @return self |
| 503 | 503 | */ |
| 504 | 504 | public function setValidationResponseCallback($callback) { |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | /** |
| 559 | 559 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
| 560 | 560 | * |
| 561 | - * @param SS_List|array $fields |
|
| 561 | + * @param FieldList|null $fields |
|
| 562 | 562 | * @param callable $funcName |
| 563 | 563 | * @return FormField |
| 564 | 564 | */ |
@@ -697,6 +697,7 @@ discard block |
||
| 697 | 697 | * Set actions that are exempt from validation |
| 698 | 698 | * |
| 699 | 699 | * @param array |
| 700 | + * @param string[] $actions |
|
| 700 | 701 | */ |
| 701 | 702 | public function setValidationExemptActions($actions) { |
| 702 | 703 | $this->validationExemptActions = $actions; |
@@ -836,6 +837,7 @@ discard block |
||
| 836 | 837 | } |
| 837 | 838 | |
| 838 | 839 | /** |
| 840 | + * @param string $name |
|
| 839 | 841 | * @return string $name |
| 840 | 842 | */ |
| 841 | 843 | public function getAttribute($name) { |
@@ -870,6 +872,7 @@ discard block |
||
| 870 | 872 | * |
| 871 | 873 | * @param array Custom attributes to process. Falls back to {@link getAttributes()}. |
| 872 | 874 | * If at least one argument is passed as a string, all arguments act as excludes by name. |
| 875 | + * @param string $attrs |
|
| 873 | 876 | * |
| 874 | 877 | * @return string HTML attributes, ready for insertion into an HTML tag |
| 875 | 878 | */ |
@@ -1077,7 +1080,7 @@ discard block |
||
| 1077 | 1080 | * If set to false (the default), then the form method is only used to construct the default |
| 1078 | 1081 | * form. |
| 1079 | 1082 | * |
| 1080 | - * @param $bool boolean |
|
| 1083 | + * @param boolean $bool boolean |
|
| 1081 | 1084 | * @return $this |
| 1082 | 1085 | */ |
| 1083 | 1086 | public function setStrictFormMethodCheck($bool) { |
@@ -1592,7 +1595,7 @@ discard block |
||
| 1592 | 1595 | * This is returned when you access a form as $FormObject rather |
| 1593 | 1596 | * than <% with FormObject %> |
| 1594 | 1597 | * |
| 1595 | - * @return HTML |
|
| 1598 | + * @return DBField |
|
| 1596 | 1599 | */ |
| 1597 | 1600 | public function forTemplate() { |
| 1598 | 1601 | $return = $this->renderWith(array_merge( |
@@ -1612,7 +1615,7 @@ discard block |
||
| 1612 | 1615 | * It triggers slightly different behaviour, such as disabling the rewriting |
| 1613 | 1616 | * of # links. |
| 1614 | 1617 | * |
| 1615 | - * @return HTML |
|
| 1618 | + * @return DBField |
|
| 1616 | 1619 | */ |
| 1617 | 1620 | public function forAjaxTemplate() { |
| 1618 | 1621 | $view = new SSViewer(array( |
@@ -1635,7 +1638,7 @@ discard block |
||
| 1635 | 1638 | * and _form_enctype. These are the attributes of the form. These fields |
| 1636 | 1639 | * can be used to send the form to Ajax. |
| 1637 | 1640 | * |
| 1638 | - * @return HTML |
|
| 1641 | + * @return string |
|
| 1639 | 1642 | */ |
| 1640 | 1643 | public function formHtmlContent() { |
| 1641 | 1644 | $this->IncludeFormTag = false; |
@@ -1896,6 +1899,9 @@ discard block |
||
| 1896 | 1899 | |
| 1897 | 1900 | protected $form; |
| 1898 | 1901 | |
| 1902 | + /** |
|
| 1903 | + * @param Form $form |
|
| 1904 | + */ |
|
| 1899 | 1905 | public function __construct($form) { |
| 1900 | 1906 | $this->form = $form; |
| 1901 | 1907 | parent::__construct(); |