Updated TreeDropdownField.php documentation

Updated code example for SS4
This commit is contained in:
Antony Thorpe 2021-02-09 16:27:13 +13:00 committed by GitHub
parent 2f5d976072
commit 77ecbd854d
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>.
*
* <code>
* use SilverStripe\CMS\Model\SiteTree;
* ...
* static $has_one = array(
* 'RightContent' => 'SiteTree'
* 'RightContent' => SiteTree::class
* );
*
* 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>