Source of file ContentWidget.php
Size: 0,655 Bytes - Last Modified: 2021-12-24T06:35:24+00:00
/var/www/docs.ssmods.com/process/src/code/ContentWidget.php
12345678910111213141516171819202122232425262728293031323334353637383940414243 | <?php /** * Content Widget * * @package silverstripe-content-widget */ class ContentWidget extends Widget { /** * @var array */ public static $db = array( "HTML" => "HTMLText" ); /** * @var string */ private static $title = "HTML Content"; /** * @var string */ private static $cmsTitle = "HTML Content"; /** * @var string */ private static $description = "Custom HTML content widget."; /** * @return FieldList */ public function getCMSFields() { $fields = parent::getCMSFields(); $fields->push(TextField::create("Title")); $fields->push(HtmlEditorField::create("HTML", "Content")); return $fields; } } |