@@ -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) { |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\ORM\DataModel; |
8 | 8 | use SilverStripe\ORM\Versioning\Versioned; |
9 | 9 | use SilverStripe\ORM\DB; |
10 | -use SilverStripe\CMS\Controllers\ModelAsController; |
|
11 | 10 | use SilverStripe\View\Requirements; |
12 | 11 | use SilverStripe\Control\SS_HTTPRequest; |
13 | 12 | use SilverStripe\Control\SS_HTTPResponse; |
@@ -341,6 +341,9 @@ |
||
341 | 341 | } |
342 | 342 | } |
343 | 343 | |
344 | + /** |
|
345 | + * @param string $field |
|
346 | + */ |
|
344 | 347 | public function getField($field) { |
345 | 348 | if($this->isFieldVirtualised($field)) { |
346 | 349 | return $this->CopyContentFrom()->getField($field); |
@@ -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 | { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * Url handler for add to campaign form |
71 | 71 | * |
72 | 72 | * @param SS_HTTPRequest $request |
73 | - * @return Form |
|
73 | + * @return null|\Form |
|
74 | 74 | */ |
75 | 75 | public function AddToCampaignForm($request) |
76 | 76 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | /** |
83 | 83 | * @param int $id |
84 | - * @return Form |
|
84 | + * @return null|\Form |
|
85 | 85 | */ |
86 | 86 | public function getAddToCampaignForm($id) |
87 | 87 | { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | /** |
59 | 59 | * @param SS_HTTPRequest $request |
60 | - * @return array |
|
60 | + * @return \SS_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 SS_HTTPRequest $request |
79 | - * @return array |
|
79 | + * @return \SS_HTTPResponse |
|
80 | 80 | */ |
81 | 81 | public function compare($request) { |
82 | 82 | $form = $this->CompareVersionsForm( |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | |
765 | 765 | /** |
766 | 766 | * @param SS_HTTPRequest $request |
767 | - * @return string HTML |
|
767 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText HTML |
|
768 | 768 | */ |
769 | 769 | public function treeview($request) { |
770 | 770 | return $this->renderWith($this->getTemplatesWithSuffix('_TreeView')); |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | |
773 | 773 | /** |
774 | 774 | * @param SS_HTTPRequest $request |
775 | - * @return string HTML |
|
775 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText HTML |
|
776 | 776 | */ |
777 | 777 | public function listview($request) { |
778 | 778 | return $this->renderWith($this->getTemplatesWithSuffix('_ListView')); |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | * Provides a slower but more precise response over SiteTreeHints |
784 | 784 | * |
785 | 785 | * @param SS_HTTPRequest $request |
786 | - * @return SS_HTTPResponse |
|
786 | + * @return \SS_HTTPResponse |
|
787 | 787 | */ |
788 | 788 | public function childfilter($request) { |
789 | 789 | // Check valid parent specified |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | * |
964 | 964 | * @param array $data |
965 | 965 | * @param Form $form |
966 | - * @return SS_HTTPResponse |
|
966 | + * @return \SS_HTTPResponse|null |
|
967 | 967 | * @throws SS_HTTPResponse_Exception |
968 | 968 | */ |
969 | 969 | public function save($data, $form) { |
@@ -1093,7 +1093,7 @@ discard block |
||
1093 | 1093 | * Actually perform the publication step |
1094 | 1094 | * |
1095 | 1095 | * @param Versioned|DataObject $record |
1096 | - * @return mixed |
|
1096 | + * @return \SS_HTTPResponse|null |
|
1097 | 1097 | */ |
1098 | 1098 | public function performPublish($record) { |
1099 | 1099 | if($record && !$record->canPublish()) { |
@@ -1112,7 +1112,7 @@ discard block |
||
1112 | 1112 | * |
1113 | 1113 | * @param array $data |
1114 | 1114 | * @param Form $form |
1115 | - * @return SS_HTTPResponse |
|
1115 | + * @return \SS_HTTPResponse|null |
|
1116 | 1116 | * @throws SS_HTTPResponse_Exception |
1117 | 1117 | */ |
1118 | 1118 | public function revert($data, $form) { |
@@ -1162,7 +1162,7 @@ discard block |
||
1162 | 1162 | * |
1163 | 1163 | * @param array $data |
1164 | 1164 | * @param Form $form |
1165 | - * @return SS_HTTPResponse |
|
1165 | + * @return \SS_HTTPResponse|null |
|
1166 | 1166 | * @throws SS_HTTPResponse_Exception |
1167 | 1167 | */ |
1168 | 1168 | public function delete($data, $form) { |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | * |
1193 | 1193 | * @param array $data |
1194 | 1194 | * @param Form $form |
1195 | - * @return SS_HTTPResponse |
|
1195 | + * @return \SS_HTTPResponse|null |
|
1196 | 1196 | * @throws SS_HTTPResponse_Exception |
1197 | 1197 | */ |
1198 | 1198 | public function archive($data, $form) { |
@@ -1247,7 +1247,7 @@ discard block |
||
1247 | 1247 | } |
1248 | 1248 | |
1249 | 1249 | /** |
1250 | - * @return SS_HTTPResponse |
|
1250 | + * @return \SS_HTTPResponse|null |
|
1251 | 1251 | */ |
1252 | 1252 | public function rollback() { |
1253 | 1253 | return $this->doRollback(array( |
@@ -1261,7 +1261,7 @@ discard block |
||
1261 | 1261 | * |
1262 | 1262 | * @param array $data |
1263 | 1263 | * @param Form $form |
1264 | - * @return SS_HTTPResponse |
|
1264 | + * @return \SS_HTTPResponse|null |
|
1265 | 1265 | */ |
1266 | 1266 | public function doRollback($data, $form) { |
1267 | 1267 | $this->extend('onBeforeRollback', $data['ID']); |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use SilverStripe\Control\SS_HTTPResponse; |
12 | 12 | use SilverStripe\Control\SS_HTTPResponse_Exception; |
13 | 13 | use SilverStripe\Core\ClassInfo; |
14 | -use SilverStripe\Core\Injector\Injector; |
|
15 | 14 | use SilverStripe\Dev\Debug; |
16 | 15 | use SilverStripe\Dev\Deprecation; |
17 | 16 | use SilverStripe\ORM\DataModel; |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use SilverStripe\Admin\CMSPreviewable; |
8 | 8 | use SilverStripe\CMS\Controllers\CMSPageEditController; |
9 | 9 | use SilverStripe\CMS\Controllers\ContentController; |
10 | -use SilverStripe\CMS\Controllers\ModelAsController; |
|
11 | 10 | use SilverStripe\CMS\Controllers\RootURLController; |
12 | 11 | use SilverStripe\CMS\Forms\SiteTreeURLSegmentField; |
13 | 12 | use SilverStripe\Control\Controller; |