SilverStripe\UserForms\Extension\UserFormFileExtension
Synopsis
class UserFormFileExtension
extends DataExtension
{
- // constants
- const USER_FORM_UPLOAD_UNKNOWN = NULL;
- const USER_FORM_UPLOAD_FALSE = 'f';
- const USER_FORM_UPLOAD_TRUE = 't';
- // members
- private static array $db = ;
- private static array $belongs_to = ;
- // methods
- public void updateTrackedFormUpload()
- private void updateDB()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Constants
Name | Value |
---|---|
USER_FORM_UPLOAD_UNKNOWN | NULL |
USER_FORM_UPLOAD_FALSE | 'f' |
USER_FORM_UPLOAD_TRUE | 't' |
Members
private
- $belongs_to
- $db
Methods
private
- updateDB() — Update File.UserFormUpload draft table without altering File.LastEdited
public
- updateTrackedFormUpload() — Check if the file is associated with a userform submission Save the result in the database as a tri-state for two reasons: a) performance - prevent the need for an extra DB query b) if in the future the UserForm submission is deleted and the uploaded file is not (file is orphaned), then it is still recorded that the file was originally uploaded from a userform submission