コード例 #1
0
 public function getCMSFields()
 {
     $pageDropDown = new DropdownField('SiteTreeID', 'LinkedPage', SiteTree::get()->sort('Title')->map('ID', 'Title'));
     $pageDropDown->setEmptyString('(Select Page)');
     $fields = parent::getCMSFields();
     $fields->push($pageDropDown);
     $fields->push(new TextField('LinkLabel'));
     return $fields;
 }
コード例 #2
0
 public function getCMSFields()
 {
     $locationDropDown = new DropdownField('LocationID', 'Choose Location', $this->getLocationOptions());
     $locationDropDown->setEmptyString('(Select Location)');
     $locationDropDown->setDescription('Create new Locations in Model Admin');
     $fields = parent::getCMSFields();
     $fields->push($locationDropDown);
     return $fields;
 }