mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2495 from madmatt/patch-1
Update datamodel.md to use an array argument to Enum instead of the more...
This commit is contained in:
commit
b5cee452b5
@ -375,7 +375,7 @@ Data is defined in the static variable $db on each class, in the format:
|
||||
"FirstName" => "Varchar",
|
||||
"Surname" => "Varchar",
|
||||
"Description" => "Text",
|
||||
"Status" => "Enum('Active, Injured, Retired')",
|
||||
"Status" => "Enum(array('Active', 'Injured', 'Retired'))",
|
||||
"Birthday" => "Date"
|
||||
);
|
||||
}
|
||||
@ -393,7 +393,7 @@ the default behavior by making a function called "get`<fieldname>`" or
|
||||
:::php
|
||||
class Player extends DataObject {
|
||||
private static $db = array(
|
||||
"Status" => "Enum('Active, Injured, Retired')"
|
||||
"Status" => "Enum(array('Active', 'Injured', 'Retired'))"
|
||||
);
|
||||
|
||||
// access through $myPlayer->Status
|
||||
|
Loading…
Reference in New Issue
Block a user