Source of file School.php
Size: 0,968 Bytes - Last Modified: 2021-12-23T10:51:36+00:00
/var/www/docs.ssmods.com/process/src/code/DataObjects/School.php
123456789101112131415161718192021222324252627282930313233343536373839404142 | <?php class School extends NeighbourhoodFeature { private static $db = array ( ); private static $has_one = array ( ); private static $has_many = array ( ); function getCMSFields() { $cityfield = new DropdownField('CityID', 'City', MunicipalityPage::get()->map('ID', 'Title')); $cityfield->setEmptyString('(Select one)'); return new FieldList( TextField::create('Name'), TextField::create('Address'), $cityfield, TextField::create('Town'), TextField::create('PostalCode'), DropdownField::create('Type','Type',array( 'Elementary School' => 'Elementary School', 'Middle School' => 'Middle School', 'Secondary School' => 'Secondary School', 'RC Elementary School' => 'RC Elementary School', 'RC Middle School' => 'RC Middle School', 'RC Secondary School' => 'RC Secondary School', 'College' => 'College' )), TextField::create('Grades'), TextField::create('Note') ); } } |