@@ -20,7 +20,7 @@ |
||
20 | 20 | if ($form instanceof Form) { |
21 | 21 | $actions = $form->Actions(); |
22 | 22 | $record = $this->record; |
23 | - $actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish','Save & Publish')); |
|
23 | + $actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish', 'Save & Publish')); |
|
24 | 24 | $btnPublish->addExtraClass('ss-ui-action-constructive'); |
25 | 25 | if (!empty($record->ID)) { |
26 | 26 | if ($record->isPublished()) { |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | use SaltedHerring\Debugger as Debugger; |
4 | 4 | |
5 | 5 | class Block extends DataObject { |
6 | - protected static $db = array ( |
|
6 | + protected static $db = array( |
|
7 | 7 | 'SortOrder' => 'Int', |
8 | 8 | 'Title' => 'Varchar(64)', |
9 | 9 | 'TitleWrapper' => 'Enum("h2,h3,h4,h5,h6")', |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | 'addMarginBottom' => 'Boolean' |
17 | 17 | ); |
18 | 18 | |
19 | - protected static $many_many = array ( |
|
19 | + protected static $many_many = array( |
|
20 | 20 | 'Pages' => 'Page' |
21 | 21 | ); |
22 | 22 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'MySQLDatabase' => 'ENGINE=MyISAM' |
30 | 30 | ); |
31 | 31 | |
32 | - protected static $extensions = array ( |
|
32 | + protected static $extensions = array( |
|
33 | 33 | 'StandardPermissions' |
34 | 34 | ); |
35 | 35 | |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | |
51 | 51 | public function VisibleTo() { |
52 | 52 | if (strlen(trim($this->MemberVisibility)) > 0) { |
53 | - $lists = 'Group: ' . str_replace(',','<br />Group: ', $this->MemberVisibility); |
|
54 | - }else{ |
|
53 | + $lists = 'Group: '.str_replace(',', '<br />Group: ', $this->MemberVisibility); |
|
54 | + } else { |
|
55 | 55 | $lists = '<em><All></em>'; |
56 | 56 | } |
57 | 57 | |
58 | - return new LiteralField('VisibleTo',$lists); |
|
58 | + return new LiteralField('VisibleTo', $lists); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function BlockType() { |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | public function shownOn() { |
66 | 66 | if ($this->showBlockbyClass) { |
67 | 67 | if (strlen(trim($this->shownInClass)) > 0) { |
68 | - $lists = 'Type: ' . str_replace(',','<br />Type: ', $this->shownInClass); |
|
69 | - }else{ |
|
68 | + $lists = 'Type: '.str_replace(',', '<br />Type: ', $this->shownInClass); |
|
69 | + } else { |
|
70 | 70 | $lists = '<em><not assigned></em>'; |
71 | 71 | } |
72 | - }else{ |
|
72 | + } else { |
|
73 | 73 | if ($this->Pages()->count() > 0) { |
74 | - $lists = 'Page: ' . implode('<br />Page: ', $this->Pages()->column('Title')); |
|
75 | - }else{ |
|
74 | + $lists = 'Page: '.implode('<br />Page: ', $this->Pages()->column('Title')); |
|
75 | + } else { |
|
76 | 76 | $lists = '<em><not assigned></em>'; |
77 | 77 | } |
78 | 78 | } |
79 | - return new LiteralField('shownOn',$lists); |
|
79 | + return new LiteralField('shownOn', $lists); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | public function getCMSFields() { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'MemberVisibility' |
90 | 90 | )); |
91 | 91 | |
92 | - $fields->addFieldToTab('Root.Main', LiteralField::create('Status', 'Status: ' . $this->Published()), 'Title'); |
|
92 | + $fields->addFieldToTab('Root.Main', LiteralField::create('Status', 'Status: '.$this->Published()), 'Title'); |
|
93 | 93 | |
94 | 94 | $memberGroups = Group::get(); |
95 | 95 | $sourcemap = $memberGroups->map('Code', 'Title'); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $pageSelector = new CheckboxSetField( |
133 | 133 | $name = "Pages", |
134 | 134 | $title = "Show on Page(s)", |
135 | - $availablePages->map('ID','Title') |
|
135 | + $availablePages->map('ID', 'Title') |
|
136 | 136 | ); |
137 | 137 | |
138 | 138 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | public function onAfterWrite() { |
176 | 176 | parent::onAfterWrite(); |
177 | 177 | if (isset($this->readmode)) { |
178 | - Versioned::set_reading_mode('Stage.' . $this->readmode); |
|
178 | + Versioned::set_reading_mode('Stage.'.$this->readmode); |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 |