Source of file StaffCategoryPage.php
Size: 0,679 Bytes - Last Modified: 2022-02-21T10:01:40+00:00
/var/www/docs.ssmods.com/process/src/code/StaffCategoryPage.php
12345678910111213141516171819202122232425262728 | <?php class StaffCategoryPage extends StaffPage { private static $has_one = array( 'StaffCategory' => 'StaffCategory' ); public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldsToTab("Root.Config", array( DropdownField::create('StaffCategoryID')->setTitle('Staff Category')->setEmptyString('Please Select')->setSource(StaffCategory::get()->sort('Title ASC')->map('ID', 'Title')) )); return $fields; } } class StaffCategoryPage_Controller extends StaffPage_Controller { public function StaffCategory() { return StaffCategory::get()->byID($this->StaffCategoryID); } } |