@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | /** |
| 259 | 259 | * Gets the combined configuration of all LeafAndMain subclasses required by the client app. |
| 260 | 260 | * |
| 261 | - * @return array |
|
| 261 | + * @return string |
|
| 262 | 262 | * |
| 263 | 263 | * WARNING: Experimental API |
| 264 | 264 | */ |
@@ -691,7 +691,7 @@ discard block |
||
| 691 | 691 | * |
| 692 | 692 | * @param string $url |
| 693 | 693 | * @param int $code |
| 694 | - * @return SS_HTTPResponse|string |
|
| 694 | + * @return string|null |
|
| 695 | 695 | */ |
| 696 | 696 | public function redirect($url, $code=302) { |
| 697 | 697 | if($this->getRequest()->isAjax()) { |
@@ -2035,7 +2035,7 @@ discard block |
||
| 2035 | 2035 | } |
| 2036 | 2036 | |
| 2037 | 2037 | /** |
| 2038 | - * @return String |
|
| 2038 | + * @return DBField |
|
| 2039 | 2039 | */ |
| 2040 | 2040 | public function Locale() { |
| 2041 | 2041 | return DBField::create_field('Locale', i18n::get_locale()); |
@@ -27,6 +27,10 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | protected $group; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param SecurityAdmin $controller |
|
| 32 | + * @param string $name |
|
| 33 | + */ |
|
| 30 | 34 | public function __construct($controller, $name, $fields = null, $actions = null, $validator = null) { |
| 31 | 35 | if(!$fields) { |
| 32 | 36 | $helpHtml = _t( |
@@ -113,7 +117,7 @@ discard block |
||
| 113 | 117 | } |
| 114 | 118 | |
| 115 | 119 | /** |
| 116 | - * @param $group Group |
|
| 120 | + * @param \SilverStripe\ORM\DataObject $group Group |
|
| 117 | 121 | */ |
| 118 | 122 | public function setGroup($group) { |
| 119 | 123 | $this->group = $group; |
@@ -141,6 +141,9 @@ discard block |
||
| 141 | 141 | Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ModelAdmin.js'); |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | + /** |
|
| 145 | + * @param string $action |
|
| 146 | + */ |
|
| 144 | 147 | public function Link($action = null) { |
| 145 | 148 | if(!$action) $action = $this->sanitiseClassName($this->modelClass); |
| 146 | 149 | return parent::Link($action); |
@@ -194,7 +197,7 @@ discard block |
||
| 194 | 197 | } |
| 195 | 198 | |
| 196 | 199 | /** |
| 197 | - * @return SearchContext |
|
| 200 | + * @return Controller |
|
| 198 | 201 | */ |
| 199 | 202 | public function getSearchContext() { |
| 200 | 203 | $context = singleton($this->modelClass)->getDefaultSearchContext(); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * Shortcut action for setting the correct active tab. |
| 67 | 67 | * |
| 68 | 68 | * @param SS_HTTPRequest $request |
| 69 | - * @return SS_HTTPResponse |
|
| 69 | + * @return \SS_HTTPResponse |
|
| 70 | 70 | */ |
| 71 | 71 | public function users($request) { |
| 72 | 72 | return $this->index($request); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * Shortcut action for setting the correct active tab. |
| 77 | 77 | * |
| 78 | 78 | * @param SS_HTTPRequest $request |
| 79 | - * @return SS_HTTPResponse |
|
| 79 | + * @return \SS_HTTPResponse |
|
| 80 | 80 | */ |
| 81 | 81 | public function groups($request) { |
| 82 | 82 | return $this->index($request); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * Shortcut action for setting the correct active tab. |
| 87 | 87 | * |
| 88 | 88 | * @param SS_HTTPRequest $request |
| 89 | - * @return SS_HTTPResponse |
|
| 89 | + * @return \SS_HTTPResponse |
|
| 90 | 90 | */ |
| 91 | 91 | public function roles($request) { |
| 92 | 92 | return $this->index($request); |
@@ -307,6 +307,9 @@ discard block |
||
| 307 | 307 | parent::__construct(); |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | + /** |
|
| 311 | + * @param string $action |
|
| 312 | + */ |
|
| 310 | 313 | public function Link($action = null) { |
| 311 | 314 | return Controller::join_links($this->gridField->Link('item'), |
| 312 | 315 | $this->record->ID ? $this->record->ID : 'new', $action); |
@@ -335,6 +338,9 @@ discard block |
||
| 335 | 338 | } |
| 336 | 339 | } |
| 337 | 340 | |
| 341 | + /** |
|
| 342 | + * @param SS_HTTPRequest $request |
|
| 343 | + */ |
|
| 338 | 344 | public function edit($request) { |
| 339 | 345 | $controller = $this->getToplevelController(); |
| 340 | 346 | $form = $this->ItemEditForm($this->gridField, $request); |
@@ -536,6 +542,9 @@ discard block |
||
| 536 | 542 | return $c; |
| 537 | 543 | } |
| 538 | 544 | |
| 545 | + /** |
|
| 546 | + * @return string |
|
| 547 | + */ |
|
| 539 | 548 | protected function getBackLink(){ |
| 540 | 549 | // TODO Coupling with CMS |
| 541 | 550 | $backlink = ''; |
@@ -637,6 +646,9 @@ discard block |
||
| 637 | 646 | } |
| 638 | 647 | } |
| 639 | 648 | |
| 649 | + /** |
|
| 650 | + * @param integer $errorCode |
|
| 651 | + */ |
|
| 640 | 652 | public function httpError($errorCode, $errorMessage = null) { |
| 641 | 653 | $controller = $this->getToplevelController(); |
| 642 | 654 | return $controller->httpError($errorCode, $errorMessage); |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | /** |
| 380 | 380 | * Return the IDs of all the marked nodes. |
| 381 | 381 | * |
| 382 | - * @return array |
|
| 382 | + * @return integer[] |
|
| 383 | 383 | */ |
| 384 | 384 | public function markedNodeIDs() { |
| 385 | 385 | return array_keys($this->markedNodes); |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | * Get the next node in the tree of the type. If there is no instance of the className descended from this node, |
| 757 | 757 | * then search the parents. |
| 758 | 758 | * @param string $className Class name of the node to find. |
| 759 | - * @param string|int $root ID/ClassName of the node to limit the search to |
|
| 759 | + * @param integer $root ID/ClassName of the node to limit the search to |
|
| 760 | 760 | * @param DataObject $afterNode Used for recursive calls to this function |
| 761 | 761 | * @return DataObject |
| 762 | 762 | */ |
@@ -52,6 +52,9 @@ discard block |
||
| 52 | 52 | ); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $action |
|
| 57 | + */ |
|
| 55 | 58 | public function Link($action = null) { |
| 56 | 59 | /** @skipUpgrade */ |
| 57 | 60 | return Controller::join_links(Director::baseURL(), "CMSSecurity", $action); |
@@ -68,6 +71,9 @@ discard block |
||
| 68 | 71 | } |
| 69 | 72 | } |
| 70 | 73 | |
| 74 | + /** |
|
| 75 | + * @param string $title |
|
| 76 | + */ |
|
| 71 | 77 | public function getResponseController($title) { |
| 72 | 78 | // Use $this to prevent use of Page to render underlying templates |
| 73 | 79 | return $this; |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | * Combine the given forms into a formset with a tabbed interface |
| 509 | 509 | * |
| 510 | 510 | * @param array $forms List of LoginForm instances |
| 511 | - * @return string |
|
| 511 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
| 512 | 512 | */ |
| 513 | 513 | protected function generateLoginFormSet($forms) { |
| 514 | 514 | $viewData = new ArrayData(array( |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | * |
| 894 | 894 | * @param string $username The user name |
| 895 | 895 | * @param string $password The password (in cleartext) |
| 896 | - * @return bool |
|
| 896 | + * @return false|null |
|
| 897 | 897 | */ |
| 898 | 898 | public static function setDefaultAdmin($username, $password) { |
| 899 | 899 | // don't overwrite if already set |
@@ -980,7 +980,7 @@ discard block |
||
| 980 | 980 | * @deprecated 4.0 Use the "Security.password_encryption_algorithm" config setting instead |
| 981 | 981 | * @param string $algorithm One of the available password encryption |
| 982 | 982 | * algorithms determined by {@link Security::get_encryption_algorithms()} |
| 983 | - * @return bool Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 983 | + * @return boolean|null Returns TRUE if the passed algorithm was valid, otherwise FALSE. |
|
| 984 | 984 | */ |
| 985 | 985 | public static function set_password_encryption_algorithm($algorithm) { |
| 986 | 986 | Deprecation::notice('4.0', 'Use the "Security.password_encryption_algorithm" config setting instead'); |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | /** |
| 1149 | 1149 | * Set to true to ignore access to disallowed actions, rather than returning permission failure |
| 1150 | 1150 | * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions() |
| 1151 | - * @param $flag True or false |
|
| 1151 | + * @param boolean $flag True or false |
|
| 1152 | 1152 | */ |
| 1153 | 1153 | public static function set_ignore_disallowed_actions($flag) { |
| 1154 | 1154 | self::$ignore_disallowed_actions = $flag; |