@@ -127,7 +127,7 @@ |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | - * @return FieldSet |
|
| 130 | + * @return Form |
|
| 131 | 131 | */ |
| 132 | 132 | function RootForm() { |
| 133 | 133 | $memberList = new MemberTableField( |
@@ -11,6 +11,9 @@ |
||
| 11 | 11 | protected $controller, $report; |
| 12 | 12 | protected $parameters; |
| 13 | 13 | |
| 14 | + /** |
|
| 15 | + * @param CMSMain $controller |
|
| 16 | + */ |
|
| 14 | 17 | function __construct($controller, $report) { |
| 15 | 18 | $this->controller = $controller; |
| 16 | 19 | $this->report = $report; |
@@ -113,6 +113,11 @@ |
||
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | + /** |
|
| 117 | + * @param string $request |
|
| 118 | + * @param string $host |
|
| 119 | + * @param string $path |
|
| 120 | + */ |
|
| 116 | 121 | private function http_post($request, $host, $path) |
| 117 | 122 | { |
| 118 | 123 | $http_request = "POST " . $path . " HTTP/1.1\r\n"; |
@@ -120,6 +120,7 @@ discard block |
||
| 120 | 120 | * See {@link PageCommentInterface::$use_ajax_commenting} |
| 121 | 121 | * |
| 122 | 122 | * @param bool |
| 123 | + * @param boolean $state |
|
| 123 | 124 | */ |
| 124 | 125 | static function set_use_ajax_commenting($state) { |
| 125 | 126 | self::$use_ajax_commenting = $state; |
@@ -154,7 +155,7 @@ discard block |
||
| 154 | 155 | * valid permission code in order to post (used to customize the error |
| 155 | 156 | * message). |
| 156 | 157 | * |
| 157 | - * @return bool |
|
| 158 | + * @return string |
|
| 158 | 159 | */ |
| 159 | 160 | function PostingRequiresPermission() { |
| 160 | 161 | return self::$comments_require_permission; |
@@ -271,6 +271,9 @@ |
||
| 271 | 271 | |
| 272 | 272 | /** |
| 273 | 273 | * Generate the templated content for a PHP script that can serve up the given piece of content with the given age and expiry |
| 274 | + * @param string $content |
|
| 275 | + * @param integer $age |
|
| 276 | + * @param string $lastModified |
|
| 274 | 277 | */ |
| 275 | 278 | protected function generatePHPCacheFile($content, $age, $lastModified) { |
| 276 | 279 | $template = file_get_contents(BASE_PATH . '/cms/code/staticpublisher/CachedPHPPage.tmpl'); |
@@ -34,6 +34,7 @@ |
||
| 34 | 34 | /** |
| 35 | 35 | * Either turns on (boolean true) or off (boolean false) the progress indicators. |
| 36 | 36 | * @see StaticPublisher::$echo_progress |
| 37 | + * @param boolean $progress |
|
| 37 | 38 | */ |
| 38 | 39 | static function set_echo_progress($progress) { |
| 39 | 40 | self::$echo_progress = (boolean)$progress; |
@@ -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) { |
@@ -377,7 +379,7 @@ discard block |
||
| 377 | 379 | * |
| 378 | 380 | * @param array $data |
| 379 | 381 | * @param Form $form |
| 380 | - * @return FormResponse |
|
| 382 | + * @return null|SS_HTTPResponse |
|
| 381 | 383 | */ |
| 382 | 384 | function save_siteconfig($data, $form) { |
| 383 | 385 | $siteConfig = SiteConfig::current_site_config(); |
@@ -851,6 +853,8 @@ discard block |
||
| 851 | 853 | * - Update the action buttons |
| 852 | 854 | * - Update the treenote |
| 853 | 855 | * - Send a status message |
| 856 | + * @param DataObject $page |
|
| 857 | + * @param string $statusMessage |
|
| 854 | 858 | */ |
| 855 | 859 | function tellBrowserAboutPublicationChange($page, $statusMessage) { |
| 856 | 860 | $JS_title = Convert::raw2js($page->TreeTitle()); |
@@ -341,6 +341,7 @@ discard block |
||
| 341 | 341 | * You should implement a Link() function in your subclass of LeftAndMain, |
| 342 | 342 | * to point to the URL of that particular controller. |
| 343 | 343 | * |
| 344 | + * @param string $action |
|
| 344 | 345 | * @return string |
| 345 | 346 | */ |
| 346 | 347 | public function Link($action = null) { |
@@ -360,6 +361,7 @@ discard block |
||
| 360 | 361 | * Returns the menu title for the given LeftAndMain subclass. |
| 361 | 362 | * Implemented static so that we can get this value without instantiating an object. |
| 362 | 363 | * Menu title is *not* internationalised. |
| 364 | + * @return string |
|
| 363 | 365 | */ |
| 364 | 366 | static function menu_title_for_class($class) { |
| 365 | 367 | $title = eval("return $class::\$menu_title;"); |
@@ -404,6 +406,10 @@ discard block |
||
| 404 | 406 | } |
| 405 | 407 | else return ""; |
| 406 | 408 | } |
| 409 | + |
|
| 410 | + /** |
|
| 411 | + * @param string $html |
|
| 412 | + */ |
|
| 407 | 413 | public function getLastFormIn($html) { |
| 408 | 414 | $parts = split('</?form[^>]*>', $html); |
| 409 | 415 | return $parts[sizeof($parts)-2]; |
@@ -481,6 +487,7 @@ discard block |
||
| 481 | 487 | |
| 482 | 488 | /** |
| 483 | 489 | * Return a list of appropriate templates for this class, with the given suffix |
| 490 | + * @param string $suffix |
|
| 484 | 491 | */ |
| 485 | 492 | protected function getTemplatesWithSuffix($suffix) { |
| 486 | 493 | $classes = array_reverse(ClassInfo::ancestry($this->class)); |
@@ -511,8 +518,10 @@ discard block |
||
| 511 | 518 | * @param $className The class of the root object |
| 512 | 519 | * @param $rootID The ID of the root object. If this is null then a complete tree will be |
| 513 | 520 | * shown |
| 514 | - * @param $childrenMethod The method to call to get the children of the tree. For example, |
|
| 521 | + * @param string $childrenMethod The method to call to get the children of the tree. For example, |
|
| 515 | 522 | * Children, AllChildrenIncludingDeleted, or AllHistoricalChildren |
| 523 | + * @param string $numChildrenMethod |
|
| 524 | + * @return string |
|
| 516 | 525 | */ |
| 517 | 526 | function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $numChildrenMethod = null, $filterFunction = null, $minNodeCount = 30) { |
| 518 | 527 | // Default childrenMethod and numChildrenMethod |
@@ -841,7 +850,7 @@ discard block |
||
| 841 | 850 | /** |
| 842 | 851 | * Returns a javascript snippet to generate a tree node for the given page, if visible |
| 843 | 852 | * |
| 844 | - * @return string |
|
| 853 | + * @return null|SS_HTTPResponse |
|
| 845 | 854 | */ |
| 846 | 855 | public function addTreeNodeJS($page, $select = false) { |
| 847 | 856 | $parentID = (int)$page->ParentID; |