Fixed relation for categories

This commit is contained in:
Sean Harvey 2009-05-15 04:05:09 +00:00
parent 6b8102894b
commit 9998db2e9e
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class RelationFieldsTestPage extends TestPage {
function getCMSFields() { function getCMSFields() {
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.CheckboxSet", $fields->addFieldToTab("Root.Content.CheckboxSet",
new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())); new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map()));
/* /*

View File

@ -16,7 +16,7 @@ class TestCategory extends DataObject {
*/ */
static function map() { static function map() {
$categories = DataObject::get('TestCategory'); $categories = DataObject::get('TestCategory');
if($categories) return $categories->toDropdownMap(); if($categories) return $categories->map('ID', 'Title');
else return array(); else return array();
} }