Source of file AdditionalPostField.php
Size: 0,818 Bytes - Last Modified: 2021-12-23T10:38:18+00:00
/var/www/docs.ssmods.com/process/src/code/AdditionalPostField.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?php class AdditionalPostField extends DataObject { private static $db = array( 'Name' => 'Varchar', 'Value' => 'Varchar', ); private static $summary_fields = array ( 'Name', 'Value', ); public function fieldLabels($includerelations = true) { $labels = parent::fieldLabels(true); $labels['Name'] = _t('AdditionalPostField.Name', 'Name'); $labels['Value'] = _t('AdditionalPostField.Value', 'Value'); return $labels; } private static $has_one = array( 'UserDefinedForm' => 'UserDefinedForm' ); public function getCMSFields() { $fields = FieldList::create( TextField::create('Name','Name'), TextField::create('Value','Value') ); return $fields; } public function getTitle() { if ($this->Name) { return $this->Name; } return parent::getTitle(); } } |