\FileAttachmentField

Defines the FileAttachementField form field type

Synopsis

class FileAttachmentField extends FileField {
}

Hierarchy

Extends

  • FileField

Members

private

  • $allowed_actions — array
    The allowed actions for the RequestHandler
  • $track_files — boolean
    Track files that are uploaded and remove the tracked files when they are saved into a record.
  • $url_handlers

protected

  • $displayFolderName — string
    UploadField compatability. Used for the select handler, when KickAssets is not installed
  • $hasInvalidFileID — boolean
    Set to true if detected invalid file ID
  • $params — array
    Extra params to send to the server with the POST request
  • $permissions — array
    A list of custom permissions for this instance Options available: - upload - attach (select from existing) - detach (remove from record, but don't delete) -delete (delete from files)
  • $previewTemplate — string
    The preview template for uploaded files. Does not necessarily apply to files that were on the record at load time, but rather to files that have been attached to the uploader client side
  • $recordDataObject
    The record that this FormField is editing
  • $settings — array
    A list of settings for this instance
  • $view — string
    The style of uploader. Options: "grid", "list"

Methods

private

protected

  • checkPerm() — Checks for a given permission. If it is a closure, invoke the method
  • defineFieldHolderRequirements() — Define some requirements and settings just before rendering the Field Holder.
  • deleteFileByID() — Deletes a file. Ensures user has permissions and the file is part of the current record, so as not to allow arbitrary deletion of files
  • getDefaults() — Gets the default settings in the actual Javascript object so that the config JSON doesn't get polluted with default settings
  • getRelation() — Gets the name of the relation, if attached to a record
  • getSetting() — Gets a given setting. Falls back on Config defaults

public