@@ -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) { |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use OptionsetField; |
9 | 9 | use TreeDropdownField; |
10 | 10 | use TextField; |
11 | -use Page_Controller; |
|
12 | 11 | |
13 | 12 | /** |
14 | 13 | * A redirector page redirects when the page is visited. |
@@ -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); |
@@ -2,8 +2,6 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace SilverStripe\CMS\Model; |
4 | 4 | |
5 | -use Exception; |
|
6 | -use SilverStripe\CMS\Controllers\ContentController; |
|
7 | 5 | use SilverStripe\ORM\DataObject; |
8 | 6 | use SilverStripe\ORM\Versioning\Versioned; |
9 | 7 | use Page; |
@@ -12,8 +10,6 @@ discard block |
||
12 | 10 | use TreeDropdownField; |
13 | 11 | use ReadonlyTransformation; |
14 | 12 | use LiteralField; |
15 | -use Page_Controller; |
|
16 | -use SilverStripe\CMS\Controllers\ModelAsController; |
|
17 | 13 | |
18 | 14 | |
19 | 15 | /** |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use SS_Report; |
6 | 6 | use SilverStripe\CMS\Model\SiteTree; |
7 | -use Deprecation; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * @package cms |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use SS_Report; |
6 | 6 | use SilverStripe\CMS\Model\SiteTree; |
7 | -use Deprecation; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * @package cms |
@@ -632,6 +632,10 @@ discard block |
||
632 | 632 | return new Folder(); |
633 | 633 | } |
634 | 634 | |
635 | + /** |
|
636 | + * @param string $childrenMethod |
|
637 | + * @param string $numChildrenMethod |
|
638 | + */ |
|
635 | 639 | public function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $numChildrenMethod = null, $filterFunction = null, $minNodeCount = 30) { |
636 | 640 | if (!$childrenMethod) $childrenMethod = 'ChildFolders'; |
637 | 641 | if (!$numChildrenMethod) $numChildrenMethod = 'numChildFolders'; |
@@ -642,6 +646,9 @@ discard block |
||
642 | 646 | return Director::absoluteBaseURL() . "assets"; |
643 | 647 | } |
644 | 648 | |
649 | + /** |
|
650 | + * @return null|string |
|
651 | + */ |
|
645 | 652 | public function SiteTreeAsUL() { |
646 | 653 | return $this->getSiteTreeFor($this->stat('tree_class'), null, 'ChildFolders', 'numChildFolders'); |
647 | 654 | } |
@@ -13,7 +13,6 @@ |
||
13 | 13 | use SilverStripe\ORM\SS_List; |
14 | 14 | use SilverStripe\Security\Security; |
15 | 15 | use SilverStripe\Security\PermissionProvider; |
16 | -use SilverStripe\Admin\CMSBatchAction; |
|
17 | 16 | use SilverStripe\Admin\CMSBatchActionHandler; |
18 | 17 | use SilverStripe\Admin\LeftAndMain; |
19 | 18 | use Session; |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | * |
1046 | 1046 | * @param int|string $id |
1047 | 1047 | * @param bool $setID |
1048 | - * @return mixed|DataObject |
|
1048 | + * @return SiteTree |
|
1049 | 1049 | * @throws SS_HTTPResponse_Exception |
1050 | 1050 | */ |
1051 | 1051 | public function getNewItem($id, $setID = true) { |
@@ -1100,7 +1100,7 @@ discard block |
||
1100 | 1100 | * Actually perform the publication step |
1101 | 1101 | * |
1102 | 1102 | * @param Versioned|DataObject $record |
1103 | - * @return mixed |
|
1103 | + * @return SS_HTTPResponse|null |
|
1104 | 1104 | */ |
1105 | 1105 | public function performPublish($record) { |
1106 | 1106 | if($record && !$record->canPublish()) { |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use ViewableData; |
9 | 9 | use ClassInfo; |
10 | 10 | use SilverStripe\Admin\CMSPreviewable; |
11 | -use SiteTreeFutureState; |
|
12 | 11 | |
13 | 12 | |
14 | 13 | /** |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use OptionsetField; |
9 | 9 | use TreeDropdownField; |
10 | 10 | use TextField; |
11 | -use Page_Controller; |
|
12 | 11 | |
13 | 12 | /** |
14 | 13 | * A redirector page redirects when the page is visited. |
@@ -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); |