@@ -35,7 +35,8 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @param $pages The DataObjectSet of SiteTree objects to perform this batch action |
| 37 | 37 | * on. |
| 38 | - * @param $helperMethod The method to call on each of those objects. |
|
| 38 | + * @param string $helperMethod The method to call on each of those objects. |
|
| 39 | + * @param string $successMessage |
|
| 39 | 40 | */ |
| 40 | 41 | public function batchaction(DataObjectSet $pages, $helperMethod, $successMessage, $arguments = array()) { |
| 41 | 42 | $failures = 0; |
@@ -72,7 +73,7 @@ discard block |
||
| 72 | 73 | * Helper method for applicablePages() methods. Acts as a skeleton implementation. |
| 73 | 74 | * |
| 74 | 75 | * @param $ids The IDs passed to applicablePages |
| 75 | - * @param $methodName The canXXX() method to call on each page to check if the action is applicable |
|
| 76 | + * @param string $methodName The canXXX() method to call on each page to check if the action is applicable |
|
| 76 | 77 | * @param $checkStagePages Set to true if you want to check stage pages |
| 77 | 78 | * @param $checkLivePages Set to true if you want to check live pages (e.g, for deleted-from-draft) |
| 78 | 79 | */ |
@@ -37,6 +37,10 @@ |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | + /** |
|
| 41 | + * @param CMSMain $parentController |
|
| 42 | + * @param string $urlSegment |
|
| 43 | + */ |
|
| 40 | 44 | function __construct($parentController, $urlSegment) { |
| 41 | 45 | $this->parentController = $parentController; |
| 42 | 46 | $this->urlSegment = $urlSegment; |
@@ -115,6 +115,7 @@ discard block |
||
| 115 | 115 | /** |
| 116 | 116 | * Overloads the LeftAndMain::ShowView. Allows to pass a page as a parameter, so we are able |
| 117 | 117 | * to switch view also for archived versions. |
| 118 | + * @param DataObject $page |
|
| 118 | 119 | */ |
| 119 | 120 | function SwitchView($page = null) { |
| 120 | 121 | if(!$page) { |
@@ -137,6 +138,7 @@ discard block |
||
| 137 | 138 | /** |
| 138 | 139 | * Override {@link LeftAndMain} Link to allow blank URL segment for CMSMain. |
| 139 | 140 | * |
| 141 | + * @param string $action |
|
| 140 | 142 | * @return string |
| 141 | 143 | */ |
| 142 | 144 | public function Link($action = null) { |
@@ -371,7 +373,7 @@ discard block |
||
| 371 | 373 | * |
| 372 | 374 | * @param array $data |
| 373 | 375 | * @param Form $form |
| 374 | - * @return FormResponse |
|
| 376 | + * @return null|SS_HTTPResponse |
|
| 375 | 377 | */ |
| 376 | 378 | function save_siteconfig($data, $form) { |
| 377 | 379 | $siteConfig = SiteConfig::current_site_config(); |
@@ -834,6 +836,8 @@ discard block |
||
| 834 | 836 | * - Update the action buttons |
| 835 | 837 | * - Update the treenote |
| 836 | 838 | * - Send a status message |
| 839 | + * @param DataObject|null $page |
|
| 840 | + * @param string $statusMessage |
|
| 837 | 841 | */ |
| 838 | 842 | function tellBrowserAboutPublicationChange($page, $statusMessage) { |
| 839 | 843 | $JS_title = Convert::raw2js($page->TreeTitle()); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * @param string $menuTitle The link's title in the CMS menu |
| 106 | 106 | * @param string $url The url of the link |
| 107 | 107 | * @param integer $priority The menu priority (sorting order) of the menu item. Higher priorities will be further left. |
| 108 | - * @return boolean The result of the operation. |
|
| 108 | + * @return boolean|null The result of the operation. |
|
| 109 | 109 | */ |
| 110 | 110 | public static function add_link($code, $menuTitle, $url, $priority = -1) { |
| 111 | 111 | return self::add_menu_item($code, $menuTitle, $url, null, $priority); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @param string $controllerClass The controller class for this menu, used to check permisssions. |
| 124 | 124 | * If blank, it's assumed that this is public, and always shown to users who |
| 125 | 125 | * have the rights to access some other part of the admin area. |
| 126 | - * @return boolean Success |
|
| 126 | + * @return boolean|null Success |
|
| 127 | 127 | */ |
| 128 | 128 | public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1) { |
| 129 | 129 | // If a class is defined, then force the use of that as a code. This helps prevent menu item duplication |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | * @param string $controllerClass The controller class for this menu, used to check permisssions. |
| 243 | 243 | * If blank, it's assumed that this is public, and always shown to users who |
| 244 | 244 | * have the rights to access some other part of the admin area. |
| 245 | - * @return boolean Success |
|
| 245 | + * @return boolean|null Success |
|
| 246 | 246 | */ |
| 247 | 247 | public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1) { |
| 248 | 248 | self::$menu_item_changes[] = array( |
@@ -254,6 +254,8 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | /** |
| 256 | 256 | * Add a previously built menuitem object to the menu |
| 257 | + * @param string $code |
|
| 258 | + * @param CMSMenuItem $cmsMenuItem |
|
| 257 | 259 | */ |
| 258 | 260 | protected static function add_menu_item_obj($code, $cmsMenuItem) { |
| 259 | 261 | self::$menu_item_changes[] = array( |
@@ -8,6 +8,12 @@ |
||
| 8 | 8 | protected $template = "CommentTableField"; |
| 9 | 9 | protected $mode; |
| 10 | 10 | |
| 11 | + /** |
|
| 12 | + * @param CommentAdmin $controller |
|
| 13 | + * @param string $name |
|
| 14 | + * @param string $sourceClass |
|
| 15 | + * @param FieldSet $detailFormFields |
|
| 16 | + */ |
|
| 11 | 17 | function __construct($controller, $name, $sourceClass, $mode, $fieldList, $detailFormFields = null, $sourceFilter = "", $sourceSort = "Created", $sourceJoin = "") { |
| 12 | 18 | $this->mode = $mode; |
| 13 | 19 | |
@@ -247,6 +247,10 @@ discard block |
||
| 247 | 247 | * match. The caller must trim matching lines from the beginning and end |
| 248 | 248 | * of the portions it is going to specify. |
| 249 | 249 | */ |
| 250 | + |
|
| 251 | + /** |
|
| 252 | + * @param double $nchunks |
|
| 253 | + */ |
|
| 250 | 254 | function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks) { |
| 251 | 255 | $flip = false; |
| 252 | 256 | |
@@ -357,6 +361,11 @@ discard block |
||
| 357 | 361 | * Note that XLIM, YLIM are exclusive bounds. |
| 358 | 362 | * All line numbers are origin-0 and discarded lines are not counted. |
| 359 | 363 | */ |
| 364 | + |
|
| 365 | + /** |
|
| 366 | + * @param integer $xoff |
|
| 367 | + * @param integer $yoff |
|
| 368 | + */ |
|
| 360 | 369 | function _compareseq ($xoff, $xlim, $yoff, $ylim) { |
| 361 | 370 | // Slide down the bottom initial diagonal. |
| 362 | 371 | while ($xoff < $xlim && $yoff < $ylim |
@@ -554,7 +563,7 @@ discard block |
||
| 554 | 563 | * |
| 555 | 564 | * $diff = new Diff($lines1, $lines2); |
| 556 | 565 | * $rev = $diff->reverse(); |
| 557 | - * @return object A Diff object representing the inverse of the |
|
| 566 | + * @return Diff A Diff object representing the inverse of the |
|
| 558 | 567 | * original diff. |
| 559 | 568 | */ |
| 560 | 569 | function reverse () { |
@@ -13,6 +13,10 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | protected $group; |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param SecurityAdmin $controller |
|
| 18 | + * @param string $name |
|
| 19 | + */ |
|
| 16 | 20 | function __construct($controller, $name, $fields = null, $actions = null, $validator = null) { |
| 17 | 21 | if(!$fields) { |
| 18 | 22 | $helpHtml = _t( |
@@ -334,6 +334,7 @@ discard block |
||
| 334 | 334 | * You should implement a Link() function in your subclass of LeftAndMain, |
| 335 | 335 | * to point to the URL of that particular controller. |
| 336 | 336 | * |
| 337 | + * @param string $action |
|
| 337 | 338 | * @return string |
| 338 | 339 | */ |
| 339 | 340 | public function Link($action = null) { |
@@ -353,6 +354,7 @@ discard block |
||
| 353 | 354 | * Returns the menu title for the given LeftAndMain subclass. |
| 354 | 355 | * Implemented static so that we can get this value without instantiating an object. |
| 355 | 356 | * Menu title is *not* internationalised. |
| 357 | + * @return string |
|
| 356 | 358 | */ |
| 357 | 359 | static function menu_title_for_class($class) { |
| 358 | 360 | $title = eval("return $class::\$menu_title;"); |
@@ -397,6 +399,10 @@ discard block |
||
| 397 | 399 | } |
| 398 | 400 | else return ""; |
| 399 | 401 | } |
| 402 | + |
|
| 403 | + /** |
|
| 404 | + * @param string $html |
|
| 405 | + */ |
|
| 400 | 406 | public function getLastFormIn($html) { |
| 401 | 407 | $parts = split('</?form[^>]*>', $html); |
| 402 | 408 | return $parts[sizeof($parts)-2]; |
@@ -474,6 +480,7 @@ discard block |
||
| 474 | 480 | |
| 475 | 481 | /** |
| 476 | 482 | * Return a list of appropriate templates for this class, with the given suffix |
| 483 | + * @param string $suffix |
|
| 477 | 484 | */ |
| 478 | 485 | protected function getTemplatesWithSuffix($suffix) { |
| 479 | 486 | $classes = array_reverse(ClassInfo::ancestry($this->class)); |
@@ -504,8 +511,10 @@ discard block |
||
| 504 | 511 | * @param $className The class of the root object |
| 505 | 512 | * @param $rootID The ID of the root object. If this is null then a complete tree will be |
| 506 | 513 | * shown |
| 507 | - * @param $childrenMethod The method to call to get the children of the tree. For example, |
|
| 514 | + * @param string $childrenMethod The method to call to get the children of the tree. For example, |
|
| 508 | 515 | * Children, AllChildrenIncludingDeleted, or AllHistoricalChildren |
| 516 | + * @param string $numChildrenMethod |
|
| 517 | + * @return string |
|
| 509 | 518 | */ |
| 510 | 519 | function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $numChildrenMethod = null, $filterFunction = null, $minNodeCount = 30) { |
| 511 | 520 | // Default childrenMethod and numChildrenMethod |
@@ -826,7 +835,7 @@ discard block |
||
| 826 | 835 | /** |
| 827 | 836 | * Returns a javascript snippet to generate a tree node for the given page, if visible |
| 828 | 837 | * |
| 829 | - * @return string |
|
| 838 | + * @return null|SS_HTTPResponse |
|
| 830 | 839 | */ |
| 831 | 840 | public function addTreeNodeJS($page, $select = false) { |
| 832 | 841 | $parentID = (int)$page->ParentID; |
@@ -843,7 +852,7 @@ discard block |
||
| 843 | 852 | /** |
| 844 | 853 | * Returns a javascript snippet to remove a tree node for the given page, if it exists. |
| 845 | 854 | * |
| 846 | - * @return string |
|
| 855 | + * @return null|SS_HTTPResponse |
|
| 847 | 856 | */ |
| 848 | 857 | public function deleteTreeNodeJS($page) { |
| 849 | 858 | $id = $page->ID ? $page->ID : $page->OldID; |
@@ -13,6 +13,10 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | protected $group; |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param SecurityAdmin $controller |
|
| 18 | + * @param string $name |
|
| 19 | + */ |
|
| 16 | 20 | function __construct($controller, $name, $fields = null, $actions = null, $validator = null) { |
| 17 | 21 | if(!$fields) { |
| 18 | 22 | $helpHtml = _t( |
@@ -91,7 +95,7 @@ discard block |
||
| 91 | 95 | } |
| 92 | 96 | |
| 93 | 97 | /** |
| 94 | - * @param $group Group |
|
| 98 | + * @param DataObject|null $group Group |
|
| 95 | 99 | */ |
| 96 | 100 | function setGroup($group) { |
| 97 | 101 | $this->group = $group; |