mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update 11_Scaffolding.md to use dataFieldByName
This commit is contained in:
parent
2d3aa0b8f8
commit
43d0ae6263
@ -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;
|
||||||
}
|
}
|
||||||
@ -225,4 +225,4 @@ Non-textual elements (such as images and their manipulations) can also be used i
|
|||||||
## API Documentation
|
## API Documentation
|
||||||
|
|
||||||
* [api:FormScaffolder]
|
* [api:FormScaffolder]
|
||||||
* [api:DataObject]
|
* [api:DataObject]
|
||||||
|
Loading…
Reference in New Issue
Block a user