@@ -116,7 +116,7 @@ |
||
116 | 116 | * @param mixed $returnVal |
117 | 117 | * @param bool $ignoreAjax |
118 | 118 | * @param array $ignoredFunctions |
119 | - * @return mixed |
|
119 | + * @return string|null |
|
120 | 120 | */ |
121 | 121 | public static function backtrace($returnVal = false, $ignoreAjax = false, $ignoredFunctions = null) { |
122 | 122 | $plainText = Director::is_cli() || (Director::is_ajax() && !$ignoreAjax); |
@@ -264,6 +264,9 @@ discard block |
||
264 | 264 | return $this; |
265 | 265 | } |
266 | 266 | |
267 | + /** |
|
268 | + * @param string $type |
|
269 | + */ |
|
267 | 270 | protected function invokeCallbacks($type, $args = array()) { |
268 | 271 | foreach($this->callbacks[$type] as $callback) { |
269 | 272 | call_user_func_array($callback, $args); |
@@ -303,6 +306,9 @@ discard block |
||
303 | 306 | $obj->$name = $this->parseValue($value, $fixtures); |
304 | 307 | } |
305 | 308 | |
309 | + /** |
|
310 | + * @param string $fieldName |
|
311 | + */ |
|
306 | 312 | protected function overrideField($obj, $fieldName, $value, $fixtures = null) { |
307 | 313 | $class = get_class($obj); |
308 | 314 | $table = DataObject::getSchema()->tableForField($class, $fieldName); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | * |
259 | 259 | * @param array $args Array of input shortcode arguments |
260 | 260 | * @param int $errorCode If the file is not found, or is inaccessible, this will be assigned to a HTTP error code. |
261 | - * @return File|null The File DataObject, if it can be found. |
|
261 | + * @return null|DataObject The File DataObject, if it can be found. |
|
262 | 262 | */ |
263 | 263 | public static function find_shortcode_record($args, &$errorCode = null) { |
264 | 264 | // Validate shortcode |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | * Check if this file can be modified |
388 | 388 | * |
389 | 389 | * @param Member $member |
390 | - * @return boolean |
|
390 | + * @return boolean|string |
|
391 | 391 | */ |
392 | 392 | public function canEdit($member = null) { |
393 | 393 | if(!$member) { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | * |
408 | 408 | * @param Member $member |
409 | 409 | * @param array $context |
410 | - * @return boolean |
|
410 | + * @return boolean|string |
|
411 | 411 | */ |
412 | 412 | public function canCreate($member = null, $context = array()) { |
413 | 413 | if(!$member) { |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | * Check if this file can be deleted |
427 | 427 | * |
428 | 428 | * @param Member $member |
429 | - * @return boolean |
|
429 | + * @return boolean|string |
|
430 | 430 | */ |
431 | 431 | public function canDelete($member = null) { |
432 | 432 | if(!$member) { |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | * |
628 | 628 | * @param string $condition The PHP condition to be evaluated. The page will be called $item |
629 | 629 | * @param array $collator An array, passed by reference, to collect all of the matching descendants. |
630 | - * @return true|null |
|
630 | + * @return boolean|null |
|
631 | 631 | */ |
632 | 632 | public function collateDescendants($condition, &$collator) { |
633 | 633 | if($children = $this->Children()) { |
@@ -988,6 +988,7 @@ discard block |
||
988 | 988 | * |
989 | 989 | * @param String File extension, without dot prefix. Use an asterisk ('*') |
990 | 990 | * to specify a generic fallback if no mapping is found for an extension. |
991 | + * @param string $ext |
|
991 | 992 | * @return String Classname for a subclass of {@link File} |
992 | 993 | */ |
993 | 994 | public static function get_class_for_file_extension($ext) { |
@@ -1125,7 +1126,6 @@ discard block |
||
1125 | 1126 | * Note that the result will not have a leading slash, and should not be used |
1126 | 1127 | * with local file paths. |
1127 | 1128 | * |
1128 | - * @param string $part,... Parts |
|
1129 | 1129 | * @return string |
1130 | 1130 | */ |
1131 | 1131 | public static function join_paths() { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * Find the given folder or create it as a database record |
48 | 48 | * |
49 | 49 | * @param string $folderPath Directory path relative to assets root |
50 | - * @return Folder|null |
|
50 | + * @return SilverStripe\Filesystem\Storage\AssetContainer |
|
51 | 51 | */ |
52 | 52 | public static function find_or_make($folderPath) { |
53 | 53 | // replace leading and trailing slashes |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | /** |
150 | 150 | * Returns all children of this folder |
151 | 151 | * |
152 | - * @return DataList |
|
152 | + * @return SilverStripe\ORM\DataList |
|
153 | 153 | */ |
154 | 154 | public function myChildren() { |
155 | 155 | return File::get()->filter("ParentID", $this->ID); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | /** |
201 | 201 | * Get the children of this folder that are also folders. |
202 | 202 | * |
203 | - * @return DataList |
|
203 | + * @return SilverStripe\ORM\DataList |
|
204 | 204 | */ |
205 | 205 | public function ChildFolders() { |
206 | 206 | return Folder::get()->filter('ParentID', $this->ID); |
@@ -513,7 +513,7 @@ |
||
513 | 513 | /** |
514 | 514 | * Get HTML for img containing the icon for this file |
515 | 515 | * |
516 | - * @return DBHTMLText |
|
516 | + * @return DBField |
|
517 | 517 | */ |
518 | 518 | public function IconTag() { |
519 | 519 | return DBField::create_field( |
@@ -4,11 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Deprecation; |
6 | 6 | use SQLExpression; |
7 | - |
|
8 | 7 | use InvalidArgumentException; |
9 | 8 | use Config; |
10 | 9 | use LogicException; |
11 | - |
|
12 | 10 | use Injector; |
13 | 11 | use SilverStripe\Model\Connect\Database; |
14 | 12 | use SilverStripe\Control\Director; |
@@ -4,15 +4,10 @@ |
||
4 | 4 | |
5 | 5 | use SilverStripe\Filesystem\Thumbnail; |
6 | 6 | use SilverStripe\Filesystem\ImageManipulation; |
7 | - |
|
8 | - |
|
9 | 7 | use Injector; |
10 | 8 | use AssetField; |
11 | 9 | use File; |
12 | 10 | use Director; |
13 | - |
|
14 | - |
|
15 | - |
|
16 | 11 | use SilverStripe\ORM\ValidationResult; |
17 | 12 | use SilverStripe\ORM\ValidationException; |
18 | 13 | use SilverStripe\ORM\FieldType\DBComposite; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | /** |
196 | 196 | * Determine if the target folder for new uploads in is visible the field UI. |
197 | 197 | * |
198 | - * @return boolean |
|
198 | + * @return boolean|string |
|
199 | 199 | */ |
200 | 200 | public function canPreviewFolder() { |
201 | 201 | if(!$this->isActive()) { |
@@ -264,6 +264,10 @@ discard block |
||
264 | 264 | return $this->record; |
265 | 265 | } |
266 | 266 | |
267 | + /** |
|
268 | + * @param null|DataObject $value |
|
269 | + * @param DataObject $record |
|
270 | + */ |
|
267 | 271 | public function setValue($value, $record = null) { |
268 | 272 | // Extract value from underlying record |
269 | 273 | if(empty($value) && $this->getName() && $record instanceof DataObject) { |
@@ -370,7 +374,7 @@ discard block |
||
370 | 374 | /** |
371 | 375 | * Determine if the user has permission to upload. |
372 | 376 | * |
373 | - * @return boolean |
|
377 | + * @return boolean|string |
|
374 | 378 | */ |
375 | 379 | public function canUpload() { |
376 | 380 | if(!$this->isActive()) { |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | * The callback can opt out of handling specific responses by returning NULL, |
508 | 508 | * in which case the default form behaviour will kick in. |
509 | 509 | * |
510 | - * @param $callback |
|
510 | + * @param Closure $callback |
|
511 | 511 | * @return self |
512 | 512 | */ |
513 | 513 | public function setValidationResponseCallback($callback) { |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | /** |
568 | 568 | * Fields can have action to, let's check if anyone of the responds to $funcname them |
569 | 569 | * |
570 | - * @param SS_List|array $fields |
|
570 | + * @param FieldList|null $fields |
|
571 | 571 | * @param callable $funcName |
572 | 572 | * @return FormField |
573 | 573 | */ |
@@ -706,6 +706,7 @@ discard block |
||
706 | 706 | * Set actions that are exempt from validation |
707 | 707 | * |
708 | 708 | * @param array |
709 | + * @param string[] $actions |
|
709 | 710 | * @return $this |
710 | 711 | */ |
711 | 712 | public function setValidationExemptActions($actions) { |
@@ -1104,7 +1105,7 @@ discard block |
||
1104 | 1105 | * If set to false (the default), then the form method is only used to construct the default |
1105 | 1106 | * form. |
1106 | 1107 | * |
1107 | - * @param $bool boolean |
|
1108 | + * @param boolean $bool boolean |
|
1108 | 1109 | * @return $this |
1109 | 1110 | */ |
1110 | 1111 | public function setStrictFormMethodCheck($bool) { |
@@ -1662,7 +1663,7 @@ discard block |
||
1662 | 1663 | * and _form_enctype. These are the attributes of the form. These fields |
1663 | 1664 | * can be used to send the form to Ajax. |
1664 | 1665 | * |
1665 | - * @return DBHTMLText |
|
1666 | + * @return string |
|
1666 | 1667 | */ |
1667 | 1668 | public function formHtmlContent() { |
1668 | 1669 | $this->IncludeFormTag = false; |
@@ -1923,6 +1924,9 @@ discard block |
||
1923 | 1924 | |
1924 | 1925 | protected $form; |
1925 | 1926 | |
1927 | + /** |
|
1928 | + * @param Form $form |
|
1929 | + */ |
|
1926 | 1930 | public function __construct($form) { |
1927 | 1931 | $this->form = $form; |
1928 | 1932 | parent::__construct(); |
@@ -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'); |