Advertisement
Guest User

Untitled

a guest
Apr 19th, 2010
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement