'Text' ); static $singular_name = 'HTML Block'; static $plural_name = 'HTML Blocks'; function __construct( $record = null, $isSingleton = false ) { parent::__construct( $record, $isSingleton ); } function ExtraOptions() { // eventually replace hard-coded "Fields"? $baseName = "Fields[$this->ID]"; $extraFields = new FieldSet(); $extraFields->push(new TextareaField($baseName . "[Content]", "Text", 4, 20, $this->Content)); return $extraFields; } function populateFromPostData($data) { $this->Content = $data['Content']; parent::populateFromPostData($data); } function getFormField() { return $this->createField(); } function getFilterField() { return $this->createField(true); } function createField() { return new LiteralField("LiteralField[$this->ID]", "
". $this->Content."
"); } /** * Populates the default fields. */ function DefaultField() { return ""; } function EditSegment() { return $this->renderWith( $this->class ); } } ?>