Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 19th, 2010  |  syntax: PHP  |  size: 0.59 KB  |  views: 65  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. ?>