Skip to content

Commit

Permalink
Merge pull request #5 from helpfulrobot/convert-to-psr-2
Browse files Browse the repository at this point in the history
Converted to PSR-2
  • Loading branch information
dhensby committed Nov 25, 2015
2 parents 641573c + 04f94ef commit d47e41d
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions code/ContentWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,40 @@
*
* @package silverstripe-content-widget
*/
class ContentWidget extends Widget {
/**
* @var array
*/
public static $db = array(
"HTML" => "HTMLText"
);
class ContentWidget extends Widget
{
/**
* @var array
*/
public static $db = array(
"HTML" => "HTMLText"
);

/**
* @var string
*/
private static $title = "HTML Content";
/**
* @var string
*/
private static $title = "HTML Content";

/**
* @var string
*/
private static $cmsTitle = "HTML Content";
/**
* @var string
*/
private static $cmsTitle = "HTML Content";

/**
* @var string
*/
private static $description = "Custom HTML content widget.";
/**
* @var string
*/
private static $description = "Custom HTML content widget.";

/**
* @return FieldList
*/
public function getCMSFields() {
$fields = parent::getCMSFields();
/**
* @return FieldList
*/
public function getCMSFields()
{
$fields = parent::getCMSFields();

$fields->push(TextField::create("Title"));
$fields->push(HtmlEditorField::create("HTML", "Content"));
$fields->push(TextField::create("Title"));
$fields->push(HtmlEditorField::create("HTML", "Content"));

return $fields;
}
return $fields;
}
}

0 comments on commit d47e41d

Please sign in to comment.