1 | <?php |
||
18 | class DownloadDocumentEvent extends Event |
||
19 | { |
||
20 | /** |
||
21 | * The 'Content Version' Salesforce Object which contained the file. |
||
22 | * |
||
23 | * Ref: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contentversion.htm |
||
24 | * @var array |
||
25 | */ |
||
26 | public $object; |
||
27 | |||
28 | /** |
||
29 | * The file name. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | public $fileName; |
||
34 | |||
35 | /** |
||
36 | * The raw file contents. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | public $fileContents; |
||
41 | |||
42 | /** |
||
43 | * @var bool whether the document can be downloaded. Defaults to true. |
||
44 | */ |
||
45 | public $canDownload; |
||
46 | |||
47 | /** |
||
48 | * @var bool whether the document can be downloaded. Defaults to true. |
||
49 | */ |
||
50 | public $unauthorizedMessage = "Unauthorized"; |
||
51 | |||
52 | /** |
||
53 | * Allow ONLY admins to download everything by default |
||
54 | */ |
||
55 | public function init() |
||
63 | } |
||
64 |