@@ -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); |
@@ -718,7 +718,7 @@ |
||
| 718 | 718 | * @param boolean $create Flag indicating whether the database should be created |
| 719 | 719 | * if it doesn't exist. If $create is false and the database doesn't exist |
| 720 | 720 | * then an error will be raised |
| 721 | - * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 721 | + * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 722 | 722 | * should be raised |
| 723 | 723 | * @return boolean Flag indicating success |
| 724 | 724 | */ |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * Remove a filter from the query |
| 103 | 103 | * |
| 104 | - * @param string|array $fieldExpression The predicate of the condition to remove |
|
| 104 | + * @param string|null $fieldExpression The predicate of the condition to remove |
|
| 105 | 105 | * (ignoring parameters). The expression will be considered a match if it's |
| 106 | 106 | * contained within any other predicate. |
| 107 | 107 | * @return DataQuery Self reference |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | /** |
| 181 | 181 | * Ensure that the query is ready to execute. |
| 182 | 182 | * |
| 183 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
| 183 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
| 184 | 184 | * @return SQLSelect The finalised sql query |
| 185 | 185 | */ |
| 186 | 186 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -1040,6 +1040,9 @@ discard block |
||
| 1040 | 1040 | */ |
| 1041 | 1041 | protected $whereQuery; |
| 1042 | 1042 | |
| 1043 | + /** |
|
| 1044 | + * @param string $connective |
|
| 1045 | + */ |
|
| 1043 | 1046 | public function __construct(DataQuery $base, $connective) { |
| 1044 | 1047 | parent::__construct($base->dataClass); |
| 1045 | 1048 | $this->query = $base->query; |
@@ -1049,6 +1052,9 @@ discard block |
||
| 1049 | 1052 | $base->where($this); |
| 1050 | 1053 | } |
| 1051 | 1054 | |
| 1055 | + /** |
|
| 1056 | + * @param string $filter |
|
| 1057 | + */ |
|
| 1052 | 1058 | public function where($filter) { |
| 1053 | 1059 | if($filter) { |
| 1054 | 1060 | $this->whereQuery->addWhere($filter); |
@@ -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; |
@@ -4,14 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | |
| 6 | 6 | |
| 7 | -use SilverStripe\ORM\FieldType\DBHTMLText; |
|
| 8 | 7 | use SilverStripe\ORM\SS_List; |
| 9 | 8 | use SilverStripe\ORM\ArrayList; |
| 10 | -use SilverStripe\ORM\FieldType\DBField; |
|
| 11 | 9 | use SilverStripe\ORM\DataObjectInterface; |
| 12 | 10 | use FormField; |
| 13 | 11 | use InvalidArgumentException; |
| 14 | -use Requirements; |
|
| 15 | 12 | use Config; |
| 16 | 13 | |
| 17 | 14 | |
@@ -66,6 +66,7 @@ discard block |
||
| 66 | 66 | * while automatically busting this cache every time the file is changed. |
| 67 | 67 | * |
| 68 | 68 | * @param bool |
| 69 | + * @param boolean $var |
|
| 69 | 70 | */ |
| 70 | 71 | public static function set_suffix_requirements($var) { |
| 71 | 72 | self::backend()->setSuffixRequirements($var); |
@@ -784,6 +785,7 @@ discard block |
||
| 784 | 785 | * Forces the JavaScript requirements to the end of the body, right before the closing tag |
| 785 | 786 | * |
| 786 | 787 | * @param bool |
| 788 | + * @param boolean $var |
|
| 787 | 789 | * @return $this |
| 788 | 790 | */ |
| 789 | 791 | public function setForceJSToBottom($var) { |
@@ -72,7 +72,6 @@ |
||
| 72 | 72 | /** |
| 73 | 73 | * AddToCampaignHandler constructor. |
| 74 | 74 | * |
| 75 | - * @param Controller $parentController Controller for this form |
|
| 76 | 75 | * @param array|DataObject $data The data submitted as part of that form |
| 77 | 76 | * @param string $name Form name |
| 78 | 77 | */ |
@@ -14,13 +14,9 @@ |
||
| 14 | 14 | use FieldList; |
| 15 | 15 | use HiddenField; |
| 16 | 16 | use Form; |
| 17 | -use CompositeField; |
|
| 18 | -use LiteralField; |
|
| 19 | 17 | use Director; |
| 20 | 18 | use SS_HTTPResponse; |
| 21 | -use FormAction; |
|
| 22 | 19 | use SS_HTTPResponse_Exception; |
| 23 | -use HeaderField; |
|
| 24 | 20 | |
| 25 | 21 | /** |
| 26 | 22 | * Class AddToCampaignHandler - handle the AddToCampaign action. |
@@ -77,6 +77,9 @@ |
||
| 77 | 77 | return $state; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | + /** |
|
| 81 | + * @param \FieldList|null $fields |
|
| 82 | + */ |
|
| 80 | 83 | protected function getFieldStates($fields) { |
| 81 | 84 | $states = []; |
| 82 | 85 | foreach ($fields as $field) { |