yii2-extensions / filepond
FilePond Widget for Yii Framework.
dev-main
2024-04-17 10:17 UTC
Requires
- php: >=8.1
- ext-intl: *
- npm-asset/filepond: ^4.3
- npm-asset/filepond-plugin-file-encode: ^2.1
- npm-asset/filepond-plugin-file-rename: ^1.1
- npm-asset/filepond-plugin-file-validate-size: ^2.2
- npm-asset/filepond-plugin-file-validate-type: ^1.2
- npm-asset/filepond-plugin-image-crop: ^2.0
- npm-asset/filepond-plugin-image-exif-orientation: ^1.0
- npm-asset/filepond-plugin-image-preview: ^4.6
- npm-asset/filepond-plugin-image-transform: ^3.8
- npm-asset/filepond-plugin-pdf-preview: ^1.0
- php-forge/awesome-widget: ^0.1
- ui-awesome/html: ^0.3
- ui-awesome/html-helper: ^0.2
- yiisoft/yii2: *
Requires (Dev)
- maglnet/composer-require-checker: ^4.6
- php-forge/support: dev-main
- phpunit/phpunit: ^10.2
- roave/infection-static-analysis-plugin: ^1.32
- yii2-extensions/phpstan: dev-main
This package is auto-updated.
Last update: 2024-11-17 11:36:13 UTC
README
FilePond.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --dev --prefer-dist yii2-extensions/filepond
or add
"yii2-extensions/filepond": "dev-main"
to the require-dev section of your composer.json
file.
Usage
Name
use Yii2\Extensions\Filepond\FilePond; echo FilePond::widget(['name' => 'image_file']);
Active Field
use Yii2\Extensions\Filepond\FilePond; echo $form ->field($formModel, 'image_file') ->widget( FilePond::class, [ 'loadFileDefault' => $imageFile, 'imagePreviewHeight' => 170, 'imageCropAspectRatio' => '1:1', ], );
Controller or Model
use Yii2\Extensions\Filepond\FileProcessing; $imageFile = FileProcessing::saveWithReturningFile( $categoryForm->image_file, Yii::getAlias('@uploads'), "category{$category->id}", false );
Properties of the widget
Translation support
The extension supports translation. You can translate the extension into your language, for default the extension supports the following languages:
- Chinese
- English
- French
- German
- Poland
- Portuguese
- Russian
- Spanish
Quality code
Support versions Yii2
Testing
Check the documentation testing to learn about testing.
Our social networks
License
The MIT License. Please see License File for more information.