SHARE
TWEET

Untitled

a guest Apr 19th, 2010 68 Never
  1. <?php
  2.  
  3. class NewsItem extends DataObject {
  4.         static $db = array("Title" => "Varchar", "Content" => "HTMLText", "ForceHomepage" => "Boolean");
  5.         static $has_one = array("NewsPage" => "Page", "File" => "File");
  6.        
  7.         public function getCMSFields_forPopup() {
  8.                 $fields = new FieldSet();
  9.                 $fields->push(new Textfield("Title", "Titel"));
  10.                 $fields->push(new CheckboxField("ForceHomepage", "Auf der Homepage bevorzugt anzeigen"));
  11.                 $fields->push(new FileIFrameField("File", "Download", $this->File()));
  12.                 $fields->push(new SimpleTinyMCEField("Content", "Inhalt"));
  13.                
  14.                 return $fields;
  15.         }
  16. }
  17.  
  18. ?>
RAW Paste Data
Top