Source of file FAQQuestion.php
Size: 0,994 Bytes - Last Modified: 2021-12-23T10:51:23+00:00
/var/www/docs.ssmods.com/process/src/src/Model/FAQQuestion.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | <?php namespace TheWebmen\FAQ\Model; use SilverStripe\ORM\DataObject; use SilverStripe\CMS\Model\SiteTree; class FAQQuestion extends DataObject { private static $table_name = 'TheWebmen_FAQQuestion'; private static $singular_name = 'Question'; private static $plural_name = 'Questions'; private static $db = [ 'Question' => 'Varchar(255)', 'Answer' => 'HTMLText', 'Sort' => 'Int' ]; private static $has_one = [ 'Category' => FAQCategorie::class, 'Page' => SiteTree::class ]; private static $summary_fields = [ 'Question', 'Created' ]; private static $default_sort = 'Sort'; public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName('Sort'); $fields->removeByName('CategoryID'); $fields->removeByName('PageID'); return $fields; } public function getTitle(){ return $this->Question; } } |