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
class TagPhrase extends DataObject
{
  static $db = array (
   'TagText' => 'Text',
   'Weight' => "Enum('1,2,3,4,5,6')"
  );


  static $has_one = array (
    'Page' => 'Page'
  );



 /* static $belongs_many_many = array(
      'Pages' => 'Page'
   );*/

  public function getCMSFields_forPopup()
  {
    return new FieldSet(
      new TextField('TagText'),
      new DropdownField('Weight','Weight', singleton('TagPhrase')->dbObject('Weight')->enumValues())

    );
  }



}