@@ -12,28 +12,28 @@ |
||
12 | 12 | */ |
13 | 13 | class ContentWidget extends Widget |
14 | 14 | { |
15 | - private static $db = [ |
|
16 | - "HTML" => "HTMLText", |
|
17 | - ]; |
|
15 | + private static $db = [ |
|
16 | + "HTML" => "HTMLText", |
|
17 | + ]; |
|
18 | 18 | |
19 | - private static $title = "HTML Content"; |
|
19 | + private static $title = "HTML Content"; |
|
20 | 20 | |
21 | - private static $cmsTitle = "HTML Content"; |
|
21 | + private static $cmsTitle = "HTML Content"; |
|
22 | 22 | |
23 | - private static $description = "Custom HTML content widget."; |
|
23 | + private static $description = "Custom HTML content widget."; |
|
24 | 24 | |
25 | - private static $table_name = 'ContentWidget'; |
|
25 | + private static $table_name = 'ContentWidget'; |
|
26 | 26 | |
27 | - /** |
|
28 | - * @return FieldList |
|
29 | - */ |
|
30 | - public function getCMSFields() |
|
31 | - { |
|
32 | - $fields = parent::getCMSFields(); |
|
27 | + /** |
|
28 | + * @return FieldList |
|
29 | + */ |
|
30 | + public function getCMSFields() |
|
31 | + { |
|
32 | + $fields = parent::getCMSFields(); |
|
33 | 33 | |
34 | - $fields->push(TextField::create("Title")); |
|
35 | - $fields->push(HTMLEditorField::create("HTML", "Content")); |
|
34 | + $fields->push(TextField::create("Title")); |
|
35 | + $fields->push(HTMLEditorField::create("HTML", "Content")); |
|
36 | 36 | |
37 | - return $fields; |
|
38 | - } |
|
37 | + return $fields; |
|
38 | + } |
|
39 | 39 | } |
@@ -9,13 +9,13 @@ |
||
9 | 9 | |
10 | 10 | class ContentWidgetTest extends SapphireTest |
11 | 11 | { |
12 | - public function testHasTitleAndHtmlEditorField() |
|
13 | - { |
|
14 | - $widget = new ContentWidget; |
|
12 | + public function testHasTitleAndHtmlEditorField() |
|
13 | + { |
|
14 | + $widget = new ContentWidget; |
|
15 | 15 | |
16 | - $fields = $widget->getCMSFields(); |
|
16 | + $fields = $widget->getCMSFields(); |
|
17 | 17 | |
18 | - $this->assertInstanceOf(TextField::class, $fields->fieldByName('Title')); |
|
19 | - $this->assertInstanceOf(HTMLEditorField::class, $fields->fieldByName('HTML')); |
|
20 | - } |
|
18 | + $this->assertInstanceOf(TextField::class, $fields->fieldByName('Title')); |
|
19 | + $this->assertInstanceOf(HTMLEditorField::class, $fields->fieldByName('HTML')); |
|
20 | + } |
|
21 | 21 | } |