Source of file FAQ.php
Size: 1,054 Bytes - Last Modified: 2021-12-23T10:02:28+00:00
/var/www/docs.ssmods.com/process/src/code/model/FAQ.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 | <?php /** * Class FAQ * * @property string $Question * @property string $Content * @property int $SortOrder * @property int $ParentID * @method FAQHolderPage Parent() */ class FAQ extends DataObject { /** * @inheritdoc */ private static $db = [ 'Question' => 'Text', 'Content' => 'CustomHTMLText', 'SortOrder' => 'Int', ]; /** * @inheritdoc */ private static $has_one = [ 'Parent' => 'FAQHolderPage', ]; /** * @inheritdoc */ private static $summary_fields = [ 'Question', ]; /** * @inheritdoc */ public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName([ 'SortOrder', 'ParentID' ]); return $fields; } /** * @inheritdoc */ public function Link() { return $this->Parent()->Link() . '#FAQ' . $this->ID; } /** * @inheritdoc */ public function getTitle() { return $this->Question; } } |