@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | class BlockinPage extends Extension { |
3 | - protected static $belongs_many_many = array ( |
|
3 | + protected static $belongs_many_many = array( |
|
4 | 4 | 'Blocks' => 'Block' |
5 | 5 | ); |
6 | 6 | |
7 | - public function updateCMSFields( FieldList $fields ) { |
|
7 | + public function updateCMSFields(FieldList $fields) { |
|
8 | 8 | $ancestry = ClassInfo::ancestry($this->owner->ClassName); |
9 | 9 | if (!in_array('RedirectorPage', $ancestry) && !in_array('VirtualPage', $ancestry)) { |
10 | 10 | $blocks = $this->owner->Blocks(); |
11 | - $blocks_grid = $this->gridBuilder('Blocks', $blocks, '', true,'GridFieldConfig_RelationEditor'); |
|
11 | + $blocks_grid = $this->gridBuilder('Blocks', $blocks, '', true, 'GridFieldConfig_RelationEditor'); |
|
12 | 12 | $docked_grid = $this->gridBuilder('DockedBlocks', $this->dockedBlocks(), ''); |
13 | 13 | |
14 | 14 | $fields->addFieldToTab('Root.MyBlocks', $blocks_grid); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $grid = new GridField($name, $label, $source); |
28 | 28 | $config = $gridHeaderType::create(); |
29 | 29 | $config->removeComponentsByType('GridFieldAddNewButton'); |
30 | - if ( $canAdd ) { |
|
30 | + if ($canAdd) { |
|
31 | 31 | $config->addComponents( |
32 | 32 | $multiClass = new GridFieldAddNewMultiClass(), |
33 | 33 | $sortable = new GridFieldOrderableRows('SortOrder') |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $IDs[] = $BlockID; |
52 | 52 | } |
53 | 53 | } |
54 | - $blocks = Block::get()->filter('ID', $IDs)->sort('SortOrder','ASC'); |
|
54 | + $blocks = Block::get()->filter('ID', $IDs)->sort('SortOrder', 'ASC'); |
|
55 | 55 | return $blocks; |
56 | 56 | } |
57 | 57 | } |
58 | 58 | \ No newline at end of file |
@@ -38,8 +38,8 @@ |
||
38 | 38 | $subBlocks = ClassInfo::subclassesFor('Block'); |
39 | 39 | if (is_null($subBlocks)) { |
40 | 40 | $subBlocks = array('Block'); |
41 | - }else{ |
|
42 | - $disabledTypes = Config::inst()->get('Block','DisabledBlocks'); |
|
41 | + } else { |
|
42 | + $disabledTypes = Config::inst()->get('Block', 'DisabledBlocks'); |
|
43 | 43 | Debugger::inspect($disabledTypes); |
44 | 44 | if (!empty($disabledTypes)) { |
45 | 45 | foreach ($disabledTypes as $disabledType) { |