1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

class Course extends CalendarEvent {
  static $db = array (
    //'Category' => "Enum('Industry, Finance, Administration')",
    //'Sponsor' => 'Varchar(50)',
    //'RegistrationLink' => 'Varchar(100)'
  );

  static $has_one = array (
    //'Image' => 'Image'
  );

  static $has_many = array (
    'Dates' => 'CourseDateTime'
  );

  public function getCMSFields() {
    $f = parent::getCMSFields();
    //$f->addFieldsToTab("Root.Content.Main", new DropdownField('Category','Worshop Category', singleton('Course')->dbObject('Category')->enumValues()), 'Content');
    //$f->addFieldToTab("Root.Content.Main", new TextField('Sponsor'), 'Content');
    //$f->addFieldToTab("Root.Content.Main", new TextField('RegistrationLink','Registration Link'),'Content');
    //$f->addFieldToTab("Root.Content.Image", new ImageField('Image'));
  return $f;
  }
} // end Workshop subclass


class Course_Controller extends CalendarEvent_Controller {
}

?>