SilverCart\Admin\Forms\ImageUploadField
Same as SilverCart\Admin\Forms\FileUploadField but uses SilverCart\Model\Product\Image instead of SilverCart\Model\Product\File.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ImageUploadField
extends FileUploadField
{
- // members
- protected string $fileClassName = 'Image';
- protected string $relationClassName = SilverCart\Model\Product\Image::class;
- // Inherited members from FileUploadField
- protected string $fileClassName;
- protected string $relationClassName;
- // Inherited methods from FileUploadField
- public string getFileClassName()
- public void setFileClassName()
- public string getRelationClassName()
- public void setRelationClassName()
- public array getSchemaDataDefaults()
- public DBHTMLText Field()
- protected void attachFile()
- public HTTPResponse upload()
- public HTTPResponse attach()
- public array encodeFileAttributes()
- public string Type()
Hierarchy
Members
protected
- $fileClassName
—
string
Class name of the file object - $fileClassName
—
string
Class name of the file object - $relationClassName
—
string
Class name of the relation object - $relationClassName
—
string
Class name of the relation object
Methods
Inherited from SilverCart\Admin\Forms\FileUploadField
protected
- attachFile() — Adds a File and attaches the File onto $this->record.
public
- Field() — Adds a JS requirement and returns the field markup.
- Type() — Returns the field type used for CSS/JS.
- attach() — Retrieves details for files that this field wishes to attache to the client-side form
- encodeFileAttributes() — Prepares the given file to return as JSON output.
- getFileClassName() — Returns the file class name
- getRelationClassName() — Returns the relation class name
- getSchemaDataDefaults() — Returns the schema defaults.
- setFileClassName() — Sets the file class name
- setRelationClassName() — Sets the relation class name
- upload() — Action to handle upload of a single file