mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #3668 from phillprice/patch-7
Update DropdownField.php
This commit is contained in:
commit
2055194903
@ -13,8 +13,8 @@
|
||||
*
|
||||
* public function getCMSFields() {
|
||||
* $fields = parent::getCMSFields();
|
||||
* $field = DropdownField::create('GalleryID', 'Gallery', Gallery::get()->map('ID', 'Title'));
|
||||
* $field->setEmptyString('(Select one)');
|
||||
* $field = DropdownField::create('GalleryID', 'Gallery', Gallery::get()->map('ID', 'Title'))
|
||||
* ->setEmptyString('(Select one)');
|
||||
* $fields->addFieldToTab('Root.Content', $field, 'Content');
|
||||
* </code>
|
||||
*
|
||||
@ -33,7 +33,7 @@
|
||||
*
|
||||
* Example instantiation:
|
||||
* <code>
|
||||
* new DropdownField(
|
||||
* DropdownField::create(
|
||||
* 'Country',
|
||||
* 'Country',
|
||||
* array(
|
||||
@ -59,7 +59,7 @@
|
||||
*
|
||||
* Field construction:
|
||||
* <code>
|
||||
* new DropdownField(
|
||||
* DropdownField::create(
|
||||
* 'Country',
|
||||
* 'Country',
|
||||
* singleton('MyObject')->dbObject('Country')->enumValues()
|
||||
|
Loading…
x
Reference in New Issue
Block a user