@@ -117,6 +117,9 @@ |
||
117 | 117 | Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ModelAdmin.js'); |
118 | 118 | } |
119 | 119 | |
120 | + /** |
|
121 | + * @param string $action |
|
122 | + */ |
|
120 | 123 | public function Link($action = null) { |
121 | 124 | if(!$action) $action = $this->sanitiseClassName($this->modelClass); |
122 | 125 | return parent::Link($action); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * left. |
100 | 100 | * @param array $attributes an array of attributes to include on the link. |
101 | 101 | * |
102 | - * @return boolean The result of the operation. |
|
102 | + * @return boolean|null The result of the operation. |
|
103 | 103 | */ |
104 | 104 | public static function add_link($code, $menuTitle, $url, $priority = -1, $attributes = null) { |
105 | 105 | return self::add_menu_item($code, $menuTitle, $url, null, $priority, $attributes); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * have the rights to access some other part of the admin area. |
120 | 120 | * @param int $priority |
121 | 121 | * @param array $attributes an array of attributes to include on the link. |
122 | - * @return bool Success |
|
122 | + * @return boolean|null Success |
|
123 | 123 | */ |
124 | 124 | public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
125 | 125 | $attributes = null) { |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | * have the rights to access some other part of the admin area. |
251 | 251 | * @param int $priority |
252 | 252 | * @param array $attributes an array of attributes to include on the link. |
253 | - * @return bool Success |
|
253 | + * @return boolean|null Success |
|
254 | 254 | */ |
255 | 255 | public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
256 | 256 | $attributes = null) { |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | /** |
204 | 204 | * Gets the combined configuration of all LeafAndMain subclasses required by the client app. |
205 | 205 | * |
206 | - * @return array |
|
206 | + * @return string |
|
207 | 207 | * |
208 | 208 | * WARNING: Experimental API |
209 | 209 | */ |
@@ -646,6 +646,9 @@ discard block |
||
646 | 646 | } |
647 | 647 | } |
648 | 648 | |
649 | + /** |
|
650 | + * @param SS_HTTPRequest $request |
|
651 | + */ |
|
649 | 652 | public function index($request) { |
650 | 653 | return $this->getResponseNegotiator()->respond($request); |
651 | 654 | } |
@@ -1774,7 +1777,7 @@ discard block |
||
1774 | 1777 | * The controller might not have any previewable content, in which case |
1775 | 1778 | * this method returns FALSE. |
1776 | 1779 | * |
1777 | - * @return String|boolean |
|
1780 | + * @return boolean |
|
1778 | 1781 | */ |
1779 | 1782 | public function LinkPreview() { |
1780 | 1783 | return false; |
@@ -1961,7 +1964,7 @@ discard block |
||
1961 | 1964 | } |
1962 | 1965 | |
1963 | 1966 | /** |
1964 | - * @return String |
|
1967 | + * @return DBField |
|
1965 | 1968 | */ |
1966 | 1969 | public function Locale() { |
1967 | 1970 | return DBField::create_field('Locale', i18n::get_locale()); |
@@ -2127,6 +2130,9 @@ discard block |
||
2127 | 2130 | return (parent::isFinished() || $this->isFinished); |
2128 | 2131 | } |
2129 | 2132 | |
2133 | + /** |
|
2134 | + * @param boolean $bool |
|
2135 | + */ |
|
2130 | 2136 | public function setIsFinished($bool) { |
2131 | 2137 | $this->isFinished = $bool; |
2132 | 2138 | } |
@@ -138,6 +138,7 @@ discard block |
||
138 | 138 | * {@inheritdoc} |
139 | 139 | * |
140 | 140 | * Also set the URLParams |
141 | + * @param SS_HTTPRequest $request |
|
141 | 142 | */ |
142 | 143 | public function setRequest($request) { |
143 | 144 | $return = parent::setRequest($request); |
@@ -514,7 +515,7 @@ discard block |
||
514 | 515 | * |
515 | 516 | * @param array $params |
516 | 517 | * |
517 | - * @return string |
|
518 | + * @return DBField |
|
518 | 519 | */ |
519 | 520 | public function render($params = null) { |
520 | 521 | $template = $this->getViewer($this->getAction()); |
@@ -679,7 +680,7 @@ discard block |
||
679 | 680 | * Tests whether a redirection has been requested. If redirect() has been called, it will return |
680 | 681 | * the URL redirected to. Otherwise, it will return null. |
681 | 682 | * |
682 | - * @return null|string |
|
683 | + * @return boolean |
|
683 | 684 | */ |
684 | 685 | public function redirectedTo() { |
685 | 686 | return $this->getResponse() && $this->getResponse()->getHeader('Location'); |
@@ -282,7 +282,7 @@ |
||
282 | 282 | * |
283 | 283 | * Must not raise SS_HTTPResponse_Exceptions - instead it should return |
284 | 284 | * |
285 | - * @param $request |
|
285 | + * @param SS_HTTPRequest $request |
|
286 | 286 | * @param $action |
287 | 287 | * @return SS_HTTPResponse |
288 | 288 | */ |
@@ -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); |
@@ -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() { |
@@ -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()) { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * @param array $properties |
146 | 146 | * |
147 | - * @return DBHTMLText |
|
147 | + * @return string |
|
148 | 148 | */ |
149 | 149 | public function Field($properties = array()) { |
150 | 150 | Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | * |
495 | 495 | * @param DataObjectInterface $record |
496 | 496 | * |
497 | - * @return boolean |
|
497 | + * @return false|null |
|
498 | 498 | */ |
499 | 499 | public function saveInto(DataObjectInterface $record) { |
500 | 500 | if(!$this->isSaveable()) { |