Advertisement
Guest User

Untitled

a guest
May 26th, 2014
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. class PagesWidget extends Widget
  2. {
  3.     private static $title = "";
  4.     private static $cmsTitle = "Pages Widget";
  5.     private static $description = "Add links to other pages";
  6.  
  7.     private static $has_many = array(
  8.         'Pages' => 'Page'
  9.     );
  10.  
  11.     public function Pages() {
  12.         return $this->Pages;
  13.     }
  14.  
  15.     public function getCMSFields() {
  16.         return new FieldList(
  17.             new TreeMultiselectField("Pages", "Pages to link to")
  18.         );
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement