Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class BannerImages extends DataObject
- {
- static $db = array('Title' => 'Text');
- static $has_one = array(
- 'SiteConfig' => 'SiteConfig',
- 'BannerImage' => 'BetterImage'
- );
- static $many_many = array('Pages' => 'SiteTree');
- public function getCMSFields_forPopup()
- {
- $Pages = DataObject::get('SiteTree', 'ShowInMenus = 1');
- return new FieldSet(new TextField('Title'), new FileIFrameField('BannerImage'), new CheckboxSetField('Pages', 'Pages', $Pages));
- }
- }
Add Comment
Please, Sign In to add comment