Skip to content
PHP Ecosystem
Explore

Plugin

API reference › FilePond › asset › Plugin

enumyii2\extensions\filepond\asset\Plugin
Backed bystring
Sourcesrc/asset/Plugin.php

Represents the FilePond plugins supported by the widget.

The case value is the global JavaScript identifier under which the plugin registers itself, as expected by FilePond.registerPlugin().

See also: https://pqina.nl/filepond/docs/api/plugins/.

CaseValueDescription
FILE_ENCODE'FilePondPluginFileEncode'File Encode plugin, enabled by allowFileEncode: submits files as base64 JSON payloads.
FILE_POSTER'FilePondPluginFilePoster'File Poster plugin, enabled by allowFilePoster: renders metadata.poster images inside items.
FILE_RENAME'FilePondPluginFileRename'File Rename plugin, enabled by allowFileRename: renames files through fileRenameFunction.
FILE_VALIDATE_SIZE'FilePondPluginFileValidateSize'File Validate Size plugin, enabled by allowFileSizeValidation: validates file sizes on the client.
FILE_VALIDATE_TYPE'FilePondPluginFileValidateType'File Validate Type plugin, enabled by allowFileTypeValidation: validates file types on the client.
IMAGE_CROP'FilePondPluginImageCrop'Image Crop plugin, enabled by allowImageCrop: crops previews to imageCropAspectRatio.
IMAGE_EDIT'FilePondPluginImageEdit'Image Edit plugin, enabled by allowImageEdit: opens the Cropper.js editor.
IMAGE_EXIF_ORIENTATION'FilePondPluginImageExifOrientation'Image EXIF Orientation plugin, enabled by allowImageExifOrientation: corrects orientation from EXIF data.
IMAGE_PREVIEW'FilePondPluginImagePreview'Image Preview plugin, enabled by allowImagePreview: renders image previews.
IMAGE_TRANSFORM'FilePondPluginImageTransform'Image Transform plugin, enabled by allowImageTransform: applies crop, resize, and output transforms before submission.
PDF_PREVIEW'FilePondPluginPdfPreview'PDF Preview plugin, enabled by allowPdfPreview: renders PDF previews.
MethodDescriptionDefined by
assetClass()Returns the asset bundle class that delivers the plugin files.Plugin
hasStyles()Returns whether the plugin ships a stylesheet in its distribution.Plugin
option()Returns the FilePond option that enables or disables the plugin.Plugin
package()Returns the npm package name of the plugin.Plugin
public function assetClass(): class-string<yii2\extensions\filepond\asset\AbstractPluginAsset>

Returns the asset bundle class that delivers the plugin files.

Returns

class-string<AbstractPluginAsset>: Asset bundle class for the plugin.

public function hasStyles(): bool

Returns whether the plugin ships a stylesheet in its distribution.

Returns

bool: true when the plugin distribution includes a CSS file.

public function option(): string

Returns the FilePond option that enables or disables the plugin.

Returns

string: FilePond boolean option name.

public function package(): string

Returns the npm package name of the plugin.

Returns

string: Npm package name.