mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-08 10:41:25 +02:00
Merge pull request #3822 from muskie9/patch-2
DOCS Update 11_Scaffolding.md to use dataFieldByName
This commit is contained in:
commit
97a1cc3e7a
@ -26,7 +26,7 @@ An example is `DataObject`, SilverStripe will automatically create your CMS inte
|
|||||||
public function getCMSFields() {
|
public function getCMSFields() {
|
||||||
// parent::getCMSFields() does all the hard work and creates the fields for Title, IsActive and Content.
|
// parent::getCMSFields() does all the hard work and creates the fields for Title, IsActive and Content.
|
||||||
$fields = parent::getCMSFields();
|
$fields = parent::getCMSFields();
|
||||||
$fields->fieldByName('IsActive')->setTitle('Is active?');
|
$fields->dataFieldByName('IsActive')->setTitle('Is active?');
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user