Open Journal Systems  3.3.0
PKP\components\forms\FieldUpload Class Reference
Inheritance diagram for PKP\components\forms\FieldUpload:
PKP\components\forms\Field PKP\components\forms\FieldUploadImage

Public Member Functions

 __construct ($name, $args=[])
 
 getConfig ()
 
 validate ()
 
- Public Member Functions inherited from PKP\components\forms\Field
 getEmptyValue ()
 

Data Fields

 $component = 'field-upload'
 
 $options = []
 
- Data Fields inherited from PKP\components\forms\Field
 $component
 
 $default
 
 $description
 
 $groupId
 
 $helpSection
 
 $helpTopic
 
 $isMultilingual = false
 
 $isRequired = false
 
 $label = ''
 
 $name
 
 $showWhen
 
 $tooltip
 
 $value
 

Detailed Description

Definition at line 15 of file FieldUpload.inc.php.

Constructor & Destructor Documentation

◆ __construct()

PKP\components\forms\FieldUpload::__construct (   $name,
  $args = [] 
)

Initialize the form field

Parameters
$namestring
$argsarray [ @option label string|object @option groupId string @option isRequired boolean @option isMultilingual boolean ]

Reimplemented from PKP\components\forms\Field.

Reimplemented in PKP\components\forms\FieldUploadImage.

Definition at line 33 of file FieldUpload.inc.php.

References PKP\components\forms\Field\$name, and PKPApplication\getIntMaxFileMBs().

Member Function Documentation

◆ getConfig()

PKP\components\forms\FieldUpload::getConfig ( )

Get a configuration object representing this field to be passed to the UI Library

Returns
array

Reimplemented from PKP\components\forms\Field.

Reimplemented in PKP\components\forms\FieldUploadImage.

Definition at line 69 of file FieldUpload.inc.php.

References PKP\components\forms\FieldUpload\$options.

◆ validate()

PKP\components\forms\FieldUpload::validate ( )

Validate the field configuration

Check that no required fields are missing

Returns
boolean

Reimplemented from PKP\components\forms\Field.

Definition at line 59 of file FieldUpload.inc.php.

Field Documentation

◆ $component

PKP\components\forms\FieldUpload::$component = 'field-upload'

Which UI Library component this field represents

Definition at line 17 of file FieldUpload.inc.php.

◆ $options

array FieldUpload::$options = []

Options to pass to the dropzone.js instance.

A url key must be included with the value of the API endpoint where files can be uploaded to: <api-path>/temporaryFiles.

Definition at line 28 of file FieldUpload.inc.php.

Referenced by PKP\components\forms\FieldUpload\getConfig().


The documentation for this class was generated from the following file: