diff --git a/_config.php b/_config.php index 6c3f825..97e480a 100644 --- a/_config.php +++ b/_config.php @@ -1,6 +1,8 @@ 'SiteTree', + 'FavouritePage' => 'SilverStripe\\CMS\\Model\\SiteTree', ); public function updateCMSFields(FieldList $fields) { $fields->addFieldToTab( 'Root.Main', - new TreeDropdownField("FavouritePageID", "Favourite page", "SiteTree") + new TreeDropdownField("FavouritePageID", "Favourite page", "SilverStripe\\CMS\\Model\\SiteTree") ); } diff --git a/code/RelationFieldsTestPage.php b/code/RelationFieldsTestPage.php index 9c88c23..9468bc4 100644 --- a/code/RelationFieldsTestPage.php +++ b/code/RelationFieldsTestPage.php @@ -9,16 +9,16 @@ class RelationFieldsTestPage extends TestPage private static $has_one = array( "HasOneCompany" => "SilverStripe\\FrameworkTest\\Model\\Company", - "HasOnePage" => "SiteTree", - "HasOnePageWithSearch" => "SiteTree", + "HasOnePage" => "SilverStripe\\CMS\\Model\\SiteTree", + "HasOnePageWithSearch" => "SilverStripe\\CMS\\Model\\SiteTree", ); private static $has_many = array( "HasManyCompanies" => "SilverStripe\\FrameworkTest\\Model\\Company", - "HasManyPages" => "SiteTree", + "HasManyPages" => "SilverStripe\\CMS\\Model\\SiteTree", ); private static $many_many = array( "ManyManyCompanies" => "SilverStripe\\FrameworkTest\\Model\\Company", - "ManyManyPages" => "SiteTree", + "ManyManyPages" => "SilverStripe\\CMS\\Model\\SiteTree", ); private static $defaults = array( @@ -38,10 +38,10 @@ class RelationFieldsTestPage extends TestPage $allFields += $checkboxFields; $treeFields = array( - TreeDropdownField::create('HasOnePageID', 'HasOnePage', 'SiteTree'), - TreeDropdownField::create('HasOnePageWithSearchID', 'HasOnePageWithSearch', 'SiteTree')->setShowSearch(true), - TreeMultiselectField::create('HasManyPages', 'HasManyPages', 'SiteTree'), - TreeMultiselectField::create('ManyManyPages', 'ManyManyPages (with search)', 'SiteTree')->setShowSearch(true) + TreeDropdownField::create('HasOnePageID', 'HasOnePage', 'SilverStripe\\CMS\\Model\\SiteTree'), + TreeDropdownField::create('HasOnePageWithSearchID', 'HasOnePageWithSearch', 'SilverStripe\\CMS\\Model\\SiteTree')->setShowSearch(true), + TreeMultiselectField::create('HasManyPages', 'HasManyPages', 'SilverStripe\\CMS\\Model\\SiteTree'), + TreeMultiselectField::create('ManyManyPages', 'ManyManyPages (with search)', 'SilverStripe\\CMS\\Model\\SiteTree')->setShowSearch(true) ); $fields->addFieldsToTab('Root.Tree', $treeFields); $allFields += $treeFields; diff --git a/code/TestPage.php b/code/TestPage.php index 93cfd96..a7a1919 100644 --- a/code/TestPage.php +++ b/code/TestPage.php @@ -4,7 +4,7 @@ namespace SilverStripe\FrameworkTest\Model; use Page; -use SiteTree; + use Page_Controller; use FieldList; use FormAction; @@ -12,6 +12,8 @@ use Form; use TextField; use Email; use SilverStripe\ORM\DataObject; +use SilverStripe\CMS\Model\SiteTree; +