Merge pull request #9846 from AntonyThorpe/patch-1

Updated TreeDropdownField.php documentation
This commit is contained in:
Loz Calver 2021-02-09 09:21:26 +00:00 committed by GitHub
commit ec1ebc0908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,13 +31,15 @@ use SilverStripe\ORM\Hierarchy\MarkedSet;
* <b>Usage</b>. * <b>Usage</b>.
* *
* <code> * <code>
* use SilverStripe\CMS\Model\SiteTree;
* ...
* static $has_one = array( * static $has_one = array(
* 'RightContent' => 'SiteTree' * 'RightContent' => SiteTree::class
* ); * );
* *
* function getCMSFields() { * function getCMSFields() {
* ... * ...
* $treedropdownfield = new TreeDropdownField("RightContentID", "Choose a page to show on the right:", "SiteTree"); * $treedropdownfield = new TreeDropdownField("RightContentID", "Choose a page to show on the right:", SiteTree::class);
* .. * ..
* } * }
* </code> * </code>