Completed
Push — master ( 5b16c4...cfdfa6 )
by Jason
02:31
created
code/FlexSlider.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -2,55 +2,55 @@
 block discarded – undo
2 2
 
3 3
 class FlexSlider extends DataExtension
4 4
 {
5
-    public static $db = array(
6
-        'Animation' => "Enum('slide, fade', 'slide')",
7
-        'Loop' => 'Boolean',
8
-        'Animate' => 'Boolean',
9
-        'ThumbnailNav' => 'Boolean',
10
-    );
5
+	public static $db = array(
6
+		'Animation' => "Enum('slide, fade', 'slide')",
7
+		'Loop' => 'Boolean',
8
+		'Animate' => 'Boolean',
9
+		'ThumbnailNav' => 'Boolean',
10
+	);
11 11
 
12
-    public static $has_many = array(
13
-        'Slides' => 'SlideImage',
14
-    );
12
+	public static $has_many = array(
13
+		'Slides' => 'SlideImage',
14
+	);
15 15
 
16
-    public static $defaults = array(
17
-        'Loop' => '1',
18
-        'Animate' => '1',
19
-    );
16
+	public static $defaults = array(
17
+		'Loop' => '1',
18
+		'Animate' => '1',
19
+	);
20 20
 
21
-    public function populateDefaults()
22
-    {
23
-        parent::populateDefaults();
24
-        $this->Loop = 1;
25
-        $this->Animate = 1;
26
-    }
21
+	public function populateDefaults()
22
+	{
23
+		parent::populateDefaults();
24
+		$this->Loop = 1;
25
+		$this->Animate = 1;
26
+	}
27 27
 
28
-    public function updateCMSFields(FieldList $fields)
29
-    {
30
-        // Slides
31
-        $config = GridFieldConfig_RecordEditor::create();
32
-        if (class_exists('GridFieldSortableRows')) {
33
-            $config->addComponent(new GridFieldSortableRows('SortOrder'));
34
-        }
35
-        $config->removeComponentsByType('GridFieldAddExistingAutocompleter');
36
-        $config->removeComponentsByType('GridFieldDeleteAction');
37
-        $config->addComponent(new GridFieldDeleteAction(false));
38
-        $SlidesField = GridField::create('Slides', 'Slides', $this->owner->Slides()->sort('SortOrder'), $config);
28
+	public function updateCMSFields(FieldList $fields)
29
+	{
30
+		// Slides
31
+		$config = GridFieldConfig_RecordEditor::create();
32
+		if (class_exists('GridFieldSortableRows')) {
33
+			$config->addComponent(new GridFieldSortableRows('SortOrder'));
34
+		}
35
+		$config->removeComponentsByType('GridFieldAddExistingAutocompleter');
36
+		$config->removeComponentsByType('GridFieldDeleteAction');
37
+		$config->addComponent(new GridFieldDeleteAction(false));
38
+		$SlidesField = GridField::create('Slides', 'Slides', $this->owner->Slides()->sort('SortOrder'), $config);
39 39
 
40
-        $fields->addFieldsToTab('Root.Slides', array(
41
-            HeaderField::create('SliderHD', 'Slides', 3),
42
-            $SlidesField,
43
-            ToggleCompositeField::create('ConfigHD', 'Slider Settings', array(
44
-                CheckboxField::create('Animate', 'Animate automatically'),
45
-                DropdownField::create('Animation', 'Animation option', $this->owner->dbObject('Animation')->enumValues()),
46
-                CheckboxField::create('Loop', 'Loop the carousel'),
47
-                //CheckboxField::create('ThumbnailNav', 'Thumbnail Navigation'),
48
-            )),
49
-        ));
50
-    }
40
+		$fields->addFieldsToTab('Root.Slides', array(
41
+			HeaderField::create('SliderHD', 'Slides', 3),
42
+			$SlidesField,
43
+			ToggleCompositeField::create('ConfigHD', 'Slider Settings', array(
44
+				CheckboxField::create('Animate', 'Animate automatically'),
45
+				DropdownField::create('Animation', 'Animation option', $this->owner->dbObject('Animation')->enumValues()),
46
+				CheckboxField::create('Loop', 'Loop the carousel'),
47
+				//CheckboxField::create('ThumbnailNav', 'Thumbnail Navigation'),
48
+			)),
49
+		));
50
+	}
51 51
 
52
-    public function SlideShow()
53
-    {
54
-        return $this->owner->Slides()->filter(array('ShowSlide' => 1))->sort('SortOrder');
55
-    }
52
+	public function SlideShow()
53
+	{
54
+		return $this->owner->Slides()->filter(array('ShowSlide' => 1))->sort('SortOrder');
55
+	}
56 56
 }
Please login to merge, or discard this patch.