| 1 | <?php |
||
| 8 | class ModuleRecordFileField extends AbstractPostFileEntryPoint { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @inheritdoc |
||
| 12 | */ |
||
| 13 | protected $_URL = '$module/$record/file/$field'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @inheritdoc |
||
| 17 | */ |
||
| 18 | protected $_DATA_TYPE = 'array'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @inheritdoc |
||
| 22 | */ |
||
| 23 | protected $_REQUIRED_DATA = array( |
||
| 24 | 'format' => 'sugar-html-json', |
||
| 25 | 'delete_if_fails' => FALSE |
||
| 26 | ); |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Allow for shorthand calling of attachFile method. |
||
| 30 | * Users can simply submit the File in via string, or pass the filename => path |
||
| 31 | * @param $data |
||
| 32 | * @throws RequiredOptionsException |
||
| 33 | */ |
||
| 34 | protected function configureData($data){ |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Configure the filepath to have an @ symbol in front if one is not found |
||
| 57 | * @param string $value |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | protected function setFileFieldValue($value){ |
||
| 66 | |||
| 67 | } |