Source of file HTMLContentWidget.php
Size: 1,033 Bytes - Last Modified: 2021-12-24T06:49:10+00:00
/var/www/docs.ssmods.com/process/src/code/HTMLContentWidget.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | <?php class HTMLContentWidget extends Widget { private static $db = array( "WidgetContent" => "HTMLText" ); /** * @var string */ private static $title = "HTML Content Widget"; /** * @var string */ private static $cmsTitle = "Widget with HTML Content"; /** * @var string */ private static $description = "Display a title and HTML Content."; public function SmallWidget() { $result = array( "WidgetTitle" => $this->Title, "WidgetContent" => $this->WidgetContent ); return $result; } public function Title() { return $this->WidgetLabel; } public function getCMSFields() { $fields = parent::getCMSFields(); $fields->push(TextField::create("WidgetLabel", "Widget Label")); $fields->push(TextField::create("WidgetTitle", "Widget Title")); $fields->push(HtmlEditorField::create("WidgetContent", "Content")); return $fields; } } |