@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | static $allowed_children = 'none'; |
17 | 17 | |
18 | - private static $defaults = array ( |
|
18 | + private static $defaults = array( |
|
19 | 19 | 'ShowInMenus' => false, |
20 | 20 | 'ShowInSearch' => false |
21 | 21 | ); |
@@ -42,25 +42,25 @@ discard block |
||
42 | 42 | $photo_field = null; |
43 | 43 | $internal_page = $this->InternalPage(); |
44 | 44 | |
45 | - if($internal_page instanceof RenderableAsPortlet) { |
|
45 | + if ($internal_page instanceof RenderableAsPortlet) { |
|
46 | 46 | error_log('Class implements renderable as a portlet'); |
47 | 47 | $existing_photo = $this->InternalPage()->getPortletImage(); |
48 | 48 | } else { |
49 | 49 | // check parents recursively |
50 | 50 | $parents = class_parents($internal_page); |
51 | - error_log(print_r($parents,1)); |
|
51 | + error_log(print_r($parents, 1)); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
55 | 55 | $fields->addFieldToTab('Root.Main', |
56 | - new TreeDropdownField( "InternalPageID", _t('SlidePage.CHOOSE_INTERNAL_LINK', 'Select a page on the website to link to'), "SiteTree" )); |
|
56 | + new TreeDropdownField("InternalPageID", _t('SlidePage.CHOOSE_INTERNAL_LINK', 'Select a page on the website to link to'), "SiteTree")); |
|
57 | 57 | |
58 | 58 | |
59 | 59 | $composite_photoField = null; |
60 | 60 | |
61 | 61 | if (!$existing_photo) { |
62 | 62 | $photo_field = new UploadField('Photo', _t('SlidePage.PHOTO', 'Photo')); |
63 | - $photo_info = new LiteralField('PhotoInfo', _t('Slide.PHOTO_INFO','If the page you choose to link to has an image already it will appear here'), 'Photo'); |
|
63 | + $photo_info = new LiteralField('PhotoInfo', _t('Slide.PHOTO_INFO', 'If the page you choose to link to has an image already it will appear here'), 'Photo'); |
|
64 | 64 | $composite_photoField = CompositeField::create($photo_field, $photo_info); |
65 | 65 | |
66 | 66 | } else { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $fields->addFieldToTab("Root.Main", new TextField('Caption', _t('SlidePage.CAPTION', 'Caption'))); |
81 | 81 | $fields->renameField('Title', 'Slide Title'); |
82 | 82 | |
83 | - $fields->removeFieldFromTab("Root.Main","Content"); |
|
83 | + $fields->removeFieldFromTab("Root.Main", "Content"); |
|
84 | 84 | |
85 | 85 | return $fields; |
86 | 86 | } |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | $result = '#"'; |
116 | 116 | |
117 | 117 | if ($this->InternalPageID) { |
118 | - $targetPage = DataObject::get_by_id( 'Page', $this->InternalPageID ); |
|
119 | - if ( $targetPage ) { |
|
118 | + $targetPage = DataObject::get_by_id('Page', $this->InternalPageID); |
|
119 | + if ($targetPage) { |
|
120 | 120 | $result = $targetPage->Link(); |
121 | 121 | } else { |
122 | 122 | $result = '#'; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function newpageselected(SS_HTTPRequest $request) { |
140 | 140 | error_log('**** NEW PAGE SELECTED ****'); |
141 | - $sitetree_id = $request->param( 'ID' ); |
|
141 | + $sitetree_id = $request->param('ID'); |
|
142 | 142 | $page = SiteTree::get_by_id($sitetree_id); |
143 | 143 | $result = array(); |
144 | 144 | if ($page) { |