@@ -118,6 +118,9 @@ |
||
| 118 | 118 | return $this->defaultUrl; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | + /** |
|
| 122 | + * @param string $url |
|
| 123 | + */ |
|
| 121 | 124 | public function setDefaultURL($url) { |
| 122 | 125 | $this->defaultUrl = $url; |
| 123 | 126 | return $this; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use SilverStripe\Control\HTTPRequest; |
| 8 | 8 | use SilverStripe\Core\Convert; |
| 9 | 9 | use SilverStripe\Forms\TextField; |
| 10 | -use SilverStripe\View\Requirements; |
|
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * Used to edit the SiteTree->URLSegment property, and suggest input based on the serverside rules |
@@ -252,7 +252,7 @@ |
||
| 252 | 252 | /** |
| 253 | 253 | * Write out the published version of the page to the filesystem |
| 254 | 254 | * |
| 255 | - * @return true if the page write was successful |
|
| 255 | + * @return boolean if the page write was successful |
|
| 256 | 256 | */ |
| 257 | 257 | public function writeStaticPage() { |
| 258 | 258 | if(!self::config()->enable_static_file) { |
@@ -753,7 +753,7 @@ |
||
| 753 | 753 | * @param boolean $unlinked Whether to link page titles. |
| 754 | 754 | * @param boolean|string $stopAtPageType ClassName of a page to stop the upwards traversal. |
| 755 | 755 | * @param boolean $showHidden Include pages marked with the attribute ShowInMenus = 0 |
| 756 | - * @return string The breadcrumb trail. |
|
| 756 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText The breadcrumb trail. |
|
| 757 | 757 | */ |
| 758 | 758 | public function Breadcrumbs($maxDepth = 20, $unlinked = false, $stopAtPageType = false, $showHidden = false) { |
| 759 | 759 | $pages = $this->getBreadcrumbItems($maxDepth, $stopAtPageType, $showHidden); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | protected $recordLink; |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | - * @param DataObject|CMSPreviewable $record |
|
| 30 | + * @param CMSPreviewable $record |
|
| 31 | 31 | */ |
| 32 | 32 | public function __construct(CMSPreviewable $record) |
| 33 | 33 | { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * @return DataObject |
|
| 79 | + * @return CMSPreviewable |
|
| 80 | 80 | */ |
| 81 | 81 | public function getRecord() |
| 82 | 82 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace SilverStripe\CMS\Model; |
| 4 | 4 | |
| 5 | 5 | use SilverStripe\Assets\File; |
| 6 | -use SilverStripe\Core\Convert; |
|
| 7 | 6 | use SilverStripe\Forms\FieldList; |
| 8 | 7 | use SilverStripe\Forms\ReadonlyField; |
| 9 | 8 | use SilverStripe\ORM\DataExtension; |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | /** |
| 60 | 60 | * Generate an HTML list which provides links to where a file is used. |
| 61 | 61 | * |
| 62 | - * @return string |
|
| 62 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
| 63 | 63 | */ |
| 64 | 64 | public function BackLinkHTMLList() { |
| 65 | 65 | $viewer = new SSViewer(["type" => "Includes", self::class . "_description"]); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * |
| 43 | 43 | * @param array $data |
| 44 | 44 | * @param Form $form |
| 45 | - * @return DBHTMLText|HTTPResponse |
|
| 45 | + * @return null|HTTPResponse |
|
| 46 | 46 | */ |
| 47 | 47 | public function addtocampaign($data, $form) |
| 48 | 48 | { |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use SilverStripe\Control\Controller; |
| 9 | 9 | use SilverStripe\Control\HTTPRequest; |
| 10 | 10 | use SilverStripe\Control\HTTPResponse; |
| 11 | -use SilverStripe\Core\Convert; |
|
| 12 | 11 | use SilverStripe\Forms\Form; |
| 13 | 12 | use SilverStripe\ORM\FieldType\DBHTMLText; |
| 14 | 13 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | /** |
| 59 | 59 | * @param HTTPRequest $request |
| 60 | - * @return array |
|
| 60 | + * @return HTTPResponse |
|
| 61 | 61 | */ |
| 62 | 62 | public function show($request) { |
| 63 | 63 | $form = $this->ShowVersionForm($request->param('VersionID')); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | 78 | * @param HTTPRequest $request |
| 79 | - * @return array |
|
| 79 | + * @return HTTPResponse |
|
| 80 | 80 | */ |
| 81 | 81 | public function compare($request) { |
| 82 | 82 | $form = $this->CompareVersionsForm( |
@@ -316,6 +316,9 @@ discard block |
||
| 316 | 316 | } |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | + /** |
|
| 320 | + * @param string $link |
|
| 321 | + */ |
|
| 319 | 322 | public function LinkWithSearch($link) { |
| 320 | 323 | // Whitelist to avoid side effects |
| 321 | 324 | $params = array( |
@@ -799,7 +802,7 @@ discard block |
||
| 799 | 802 | |
| 800 | 803 | /** |
| 801 | 804 | * @param HTTPRequest $request |
| 802 | - * @return string HTML |
|
| 805 | + * @return HTTPResponse HTML |
|
| 803 | 806 | */ |
| 804 | 807 | public function treeview($request) { |
| 805 | 808 | return $this->getResponseNegotiator()->respond($request); |
@@ -807,7 +810,7 @@ discard block |
||
| 807 | 810 | |
| 808 | 811 | /** |
| 809 | 812 | * @param HTTPRequest $request |
| 810 | - * @return string HTML |
|
| 813 | + * @return HTTPResponse HTML |
|
| 811 | 814 | */ |
| 812 | 815 | public function listview($request) { |
| 813 | 816 | return $this->getResponseNegotiator()->respond($request); |
@@ -1149,7 +1152,7 @@ discard block |
||
| 1149 | 1152 | * Actually perform the publication step |
| 1150 | 1153 | * |
| 1151 | 1154 | * @param Versioned|DataObject $record |
| 1152 | - * @return mixed |
|
| 1155 | + * @return HTTPResponse|null |
|
| 1153 | 1156 | */ |
| 1154 | 1157 | public function performPublish($record) { |
| 1155 | 1158 | if($record && !$record->canPublish()) { |
@@ -16,7 +16,6 @@ |
||
| 16 | 16 | use SilverStripe\Forms\TreeDropdownField; |
| 17 | 17 | use SilverStripe\ORM\DataObject; |
| 18 | 18 | use SilverStripe\ORM\FieldType\DBField; |
| 19 | -use SilverStripe\ORM\ValidationException; |
|
| 20 | 19 | use SilverStripe\ORM\ValidationResult; |
| 21 | 20 | use SilverStripe\Security\Member; |
| 22 | 21 | use SilverStripe\Security\Security; |