@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * Find version of this object in the given stage |
133 | 133 | * |
134 | 134 | * @param string $stage |
135 | - * @return Versioned|DataObject |
|
135 | + * @return DataObject|null |
|
136 | 136 | */ |
137 | 137 | protected function getObjectInStage($stage) { |
138 | 138 | return Versioned::get_by_stage($this->ObjectClass, $stage)->byID($this->ObjectID); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | /** |
142 | 142 | * Find latest version of this object |
143 | 143 | * |
144 | - * @return Versioned|DataObject |
|
144 | + * @return DataObject|null |
|
145 | 145 | */ |
146 | 146 | protected function getObjectLatestVersion() { |
147 | 147 | return Versioned::get_latest_version($this->ObjectClass, $this->ObjectID); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | * Get the ChangeSetItems that reference a passed DataObject |
326 | 326 | * |
327 | 327 | * @param DataObject $object |
328 | - * @return DataList |
|
328 | + * @return SilverStripe\Model\DataList |
|
329 | 329 | */ |
330 | 330 | public static function get_for_object($object) { |
331 | 331 | return ChangeSetItem::get()->filter([ |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * |
340 | 340 | * @param int $objectID The ID of the object |
341 | 341 | * @param string $objectClass The class of the object (or any parent class) |
342 | - * @return DataList |
|
342 | + * @return SilverStripe\Model\DataList |
|
343 | 343 | */ |
344 | 344 | public static function get_for_object_by_id($objectID, $objectClass) { |
345 | 345 | return ChangeSetItem::get()->filter([ |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | /** |
729 | 729 | * All custom objects with the same number. E.g. 'Page 1' owns 'Custom 1' |
730 | 730 | * |
731 | - * @return DataList |
|
731 | + * @return SilverStripe\Model\DataList |
|
732 | 732 | */ |
733 | 733 | public function Custom() { |
734 | 734 | $title = str_replace('Page', 'Custom', $this->Title); |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | /** |
783 | 783 | * All pages with the same number. E.g. 'Page 1' owns 'Custom 1' |
784 | 784 | * |
785 | - * @return DataList |
|
785 | + * @return SilverStripe\Model\DataList |
|
786 | 786 | */ |
787 | 787 | public function Pages() { |
788 | 788 | $title = str_replace('Custom', 'Page', $this->Title); |
@@ -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); |
@@ -119,6 +119,7 @@ discard block |
||
119 | 119 | /** |
120 | 120 | * Returns true if negotiation is enabled for the given response. By default, negotiation is only |
121 | 121 | * enabled for pages that have the xml header. |
122 | + * @param HTTPResponse $response |
|
122 | 123 | */ |
123 | 124 | public static function enabled_for($response) { |
124 | 125 | $contentType = $response->getHeader("Content-Type"); |
@@ -134,7 +135,7 @@ discard block |
||
134 | 135 | } |
135 | 136 | |
136 | 137 | /** |
137 | - * @param SS_HTTPResponse $response |
|
138 | + * @param HTTPResponse $response |
|
138 | 139 | */ |
139 | 140 | public static function process(HTTPResponse $response) { |
140 | 141 | if(!self::enabled_for($response)) return; |
@@ -184,7 +185,7 @@ discard block |
||
184 | 185 | * Replaces a few common tags and entities with their XHTML representations (<br>, <img>, |
185 | 186 | * <input>, checked, selected). |
186 | 187 | * |
187 | - * @param SS_HTTPResponse $response |
|
188 | + * @param HTTPResponse $response |
|
188 | 189 | * |
189 | 190 | * @todo Search for more xhtml replacement |
190 | 191 | */ |
@@ -224,7 +225,7 @@ discard block |
||
224 | 225 | * - Replaces all occurrences of "application/xhtml+xml" with "text/html" in the template. |
225 | 226 | * - Removes "xmlns" attributes and any <?xml> Pragmas. |
226 | 227 | * |
227 | - * @param SS_HTTPResponse $response |
|
228 | + * @param HTTPResponse $response |
|
228 | 229 | */ |
229 | 230 | public function html(HTTPResponse $response) { |
230 | 231 | $encoding = Config::inst()->get('SilverStripe\Control\ContentNegotiator', 'encoding'); |
@@ -142,6 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | /** |
144 | 144 | * Set the DataModel for this request. |
145 | + * @param DataModel $model |
|
145 | 146 | */ |
146 | 147 | public function setDataModel($model) { |
147 | 148 | $this->model = $model; |
@@ -259,6 +260,9 @@ discard block |
||
259 | 260 | return $this; |
260 | 261 | } |
261 | 262 | |
263 | + /** |
|
264 | + * @param HTTPRequest $request |
|
265 | + */ |
|
262 | 266 | protected function findAction($request) { |
263 | 267 | $handlerClass = ($this->class) ? $this->class : get_class($this); |
264 | 268 | |
@@ -405,6 +409,7 @@ discard block |
||
405 | 409 | |
406 | 410 | /** |
407 | 411 | * Return the class that defines the given action, so that we know where to check allowed_actions. |
412 | + * @return string|null |
|
408 | 413 | */ |
409 | 414 | protected function definingClassForAction($actionOrigCasing) { |
410 | 415 | $action = strtolower($actionOrigCasing); |
@@ -514,6 +519,7 @@ discard block |
||
514 | 519 | * or {@link handleRequest()}, but in some based we want to set it manually. |
515 | 520 | * |
516 | 521 | * @param SS_HTTPRequest |
522 | + * @param HTTPRequest $request |
|
517 | 523 | */ |
518 | 524 | public function setRequest($request) { |
519 | 525 | $this->request = $request; |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | * |
281 | 281 | * @deprecated 4.0 Use the "Session.timeout_ips" config setting instead |
282 | 282 | * |
283 | - * @param array $session_ips Array of IPv4 rules. |
|
284 | 283 | */ |
285 | 284 | public static function set_timeout_ips($ips) { |
286 | 285 | Deprecation::notice('4.0', 'Use the "Session.timeout_ips" config setting instead'); |
@@ -417,6 +416,9 @@ discard block |
||
417 | 416 | } |
418 | 417 | } |
419 | 418 | |
419 | + /** |
|
420 | + * @param string $name |
|
421 | + */ |
|
420 | 422 | public function inst_set($name, $val) { |
421 | 423 | // Quicker execution path for "."-free names |
422 | 424 | if(strpos($name, '.') === false) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * Provide a response for the given file request |
49 | 49 | * |
50 | - * @param \SS_HTTPRequest $request |
|
50 | + * @param HTTPRequest $request |
|
51 | 51 | * @return \SS_HTTPResponse |
52 | 52 | */ |
53 | 53 | public function handleFile(HTTPRequest $request) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * Get the file component from the request |
79 | 79 | * |
80 | - * @param \SS_HTTPRequest $request |
|
80 | + * @param HTTPRequest $request |
|
81 | 81 | * @return string |
82 | 82 | */ |
83 | 83 | protected function parseFilename(HTTPRequest $request) { |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
201 | - * @return ArrayList |
|
201 | + * @return SilverStripe\Model\ArrayList |
|
202 | 202 | */ |
203 | 203 | public function getComponents() { |
204 | 204 | return $this->config->getComponents(); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @todo refactor this into GridFieldComponent |
211 | 211 | * |
212 | - * @param mixed $value |
|
212 | + * @param string $value |
|
213 | 213 | * @param string|array $castingDefinition |
214 | 214 | * |
215 | 215 | * @return mixed |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | * |
297 | 297 | * @param array $properties |
298 | 298 | * |
299 | - * @return HTMLText |
|
299 | + * @return DBField |
|
300 | 300 | */ |
301 | 301 | public function FieldHolder($properties = array()) { |
302 | 302 | Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css'); |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | /** |
611 | 611 | * @param array $properties |
612 | 612 | * |
613 | - * @return HTMLText |
|
613 | + * @return DBField |
|
614 | 614 | */ |
615 | 615 | public function Field($properties = array()) { |
616 | 616 | $this->extend('onBeforeRender', $this); |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | * |
850 | 850 | * @param array $data |
851 | 851 | * @param Form $form |
852 | - * @param SS_HTTPRequest $request |
|
852 | + * @param HTTPRequest $request |
|
853 | 853 | * |
854 | 854 | * @return string |
855 | 855 | */ |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | * |
944 | 944 | * @todo copy less code from RequestHandler. |
945 | 945 | * |
946 | - * @param SS_HTTPRequest $request |
|
946 | + * @param HTTPRequest $request |
|
947 | 947 | * @param DataModel $model |
948 | 948 | * |
949 | 949 | * @return array|RequestHandler|SS_HTTPResponse|string|void |
@@ -192,6 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | /** |
194 | 194 | * @param String |
195 | + * @param string $class |
|
195 | 196 | */ |
196 | 197 | public function setItemRequestClass($class) { |
197 | 198 | $this->itemRequestClass = $class; |
@@ -299,6 +300,9 @@ discard block |
||
299 | 300 | parent::__construct(); |
300 | 301 | } |
301 | 302 | |
303 | + /** |
|
304 | + * @param string $action |
|
305 | + */ |
|
302 | 306 | public function Link($action = null) { |
303 | 307 | return Controller::join_links($this->gridField->Link('item'), |
304 | 308 | $this->record->ID ? $this->record->ID : 'new', $action); |
@@ -524,6 +528,9 @@ discard block |
||
524 | 528 | return $c; |
525 | 529 | } |
526 | 530 | |
531 | + /** |
|
532 | + * @return string |
|
533 | + */ |
|
527 | 534 | protected function getBackLink(){ |
528 | 535 | // TODO Coupling with CMS |
529 | 536 | $backlink = ''; |
@@ -625,6 +632,9 @@ discard block |
||
625 | 632 | } |
626 | 633 | } |
627 | 634 | |
635 | + /** |
|
636 | + * @param integer $errorCode |
|
637 | + */ |
|
628 | 638 | public function httpError($errorCode, $errorMessage = null) { |
629 | 639 | $controller = $this->getToplevelController(); |
630 | 640 | return $controller->httpError($errorCode, $errorMessage); |