Completed
Push — master ( 2d50a9...68f946 )
by Leo
02:36
created
code/SHBlocksAdmin.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -4,42 +4,42 @@
 block discarded – undo
4 4
  *
5 5
  * Left-hand-side tab : Admin Blocks
6 6
  * */
7
-	class SHBlocksAdmin extends ModelAdmin {
8
-		private static $managed_models = array('SHBlock');
9
-		private static $url_segment = 'sh-blocks';
10
-		private static $menu_title = 'SH Blocks';
11
-		private static $menu_priority = 10;
12
-		private static $menu_icon = 'silverstripe-block/images/icon-block.png';
7
+    class SHBlocksAdmin extends ModelAdmin {
8
+        private static $managed_models = array('SHBlock');
9
+        private static $url_segment = 'sh-blocks';
10
+        private static $menu_title = 'SH Blocks';
11
+        private static $menu_priority = 10;
12
+        private static $menu_icon = 'silverstripe-block/images/icon-block.png';
13 13
 			
14
-		public function getEditForm($id = null, $fields = null) {
15
-			$form = parent::getEditForm($id, $fields);
14
+        public function getEditForm($id = null, $fields = null) {
15
+            $form = parent::getEditForm($id, $fields);
16 16
 			
17
-			$grid = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));
17
+            $grid = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));
18 18
 			
19
-			$grid->getConfig()
20
-				->removeComponentsByType('GridFieldPaginator')
21
-				->removeComponentsByType('GridFieldAddNewButton')
22
-				->removeComponentsByType('GridFieldPrintButton')
23
-				->removeComponentsByType('GridFieldExportButton')
24
-				->addComponents(
25
-					new GridFieldPaginatorWithShowAll(30),
26
-					$multiClass = new MultiClassSelector(),
27
-					$sortable = new GridFieldOrderableRows('SortOrder')
28
-				);
19
+            $grid->getConfig()
20
+                ->removeComponentsByType('GridFieldPaginator')
21
+                ->removeComponentsByType('GridFieldAddNewButton')
22
+                ->removeComponentsByType('GridFieldPrintButton')
23
+                ->removeComponentsByType('GridFieldExportButton')
24
+                ->addComponents(
25
+                    new GridFieldPaginatorWithShowAll(30),
26
+                    $multiClass = new MultiClassSelector(),
27
+                    $sortable = new GridFieldOrderableRows('SortOrder')
28
+                );
29 29
 			
30
-			$subBlocks = ClassInfo::subclassesFor('SHBlock');
31
-			if (is_null($subBlocks)) {
32
-				$subBlocks = array('SHBlock');
33
-			}else{
34
-				unset($subBlocks['SHBlock']);
30
+            $subBlocks = ClassInfo::subclassesFor('SHBlock');
31
+            if (is_null($subBlocks)) {
32
+                $subBlocks = array('SHBlock');
33
+            }else{
34
+                unset($subBlocks['SHBlock']);
35 35
 				
36
-				foreach ($subBlocks as $key => &$value) {
37
-					$value = empty($key::$singular_name) ? ucwords(trim(strtolower(preg_replace('/_?([A-Z])/', ' $1', $value)))) : $key::$singular_name;
38
-				}
39
-			}
36
+                foreach ($subBlocks as $key => &$value) {
37
+                    $value = empty($key::$singular_name) ? ucwords(trim(strtolower(preg_replace('/_?([A-Z])/', ' $1', $value)))) : $key::$singular_name;
38
+                }
39
+            }
40 40
 			
41
-			$multiClass->setClasses($subBlocks);
42
-			$grid->setTitle('All Blcoks');
43
-			return $form;
44
-		}
45
-	}
46 41
\ No newline at end of file
42
+            $multiClass->setClasses($subBlocks);
43
+            $grid->setTitle('All Blcoks');
44
+            return $form;
45
+        }
46
+    }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
code/ExtendedBlocks/SingleColumnBlock.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class SingleColumnBlock extends SHBlock {
4
-	protected static $singular_name = 'Single-column Block';
5
-	protected static $db = array (
6
-		'Content'	=>	'HTMLText'
7
-	);
4
+    protected static $singular_name = 'Single-column Block';
5
+    protected static $db = array (
6
+        'Content'	=>	'HTMLText'
7
+    );
8 8
 }
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
code/ExtendedBlocks/TriColumnBlock.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class TriColumnBlock extends SHBlock {
4
-	protected static $singular_name = 'Triple-column Block';
5
-	protected static $db = array (
6
-		'LeftColumn'		=>	'HTMLText',
7
-		'MiddleColumn'	=>	'HTMLText',
8
-		'RightColumn'	=>	'HTMLText'
9
-	);
4
+    protected static $singular_name = 'Triple-column Block';
5
+    protected static $db = array (
6
+        'LeftColumn'		=>	'HTMLText',
7
+        'MiddleColumn'	=>	'HTMLText',
8
+        'RightColumn'	=>	'HTMLText'
9
+    );
10 10
 }
11 11
\ No newline at end of file
Please login to merge, or discard this patch.