PHP Класс Devise\Pages\Fields\Handlers\ImageFieldUpdated

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Images $Images, MediaPaths $MediaPaths, Caption $Caption, Framework $Framework ) Constructs a new Image field updated event handler
handle ( Field $field, array $input, $beforeChanges ) : array This is called anytime after we update an image field in devise

Защищенные методы

Метод Описание
createThumbnailOfImage ( Field $field, $input ) : string Create a version of this thumbnail, crops too when $crop is set to true
createVersionOfImage ( Field $field, $input ) : string Create a version of this image, crops too when $crop is set to true
croppedImagePath ( Field $field, $type = 'image' ) : string Creates a cropped versioned copy of this image
resizedImagePath ( Field $field, $width, $height ) : string Create a version of this thumbnail, crops too when $crop is set to true
saveCaption ( $imagePath, array $input ) : string Save or overwrite caption file for image
versionedImagePath ( Field $field ) : string Creates a versioned copy of this image

Описание методов

__construct() публичный Метод

Constructs a new Image field updated event handler
public __construct ( Images $Images, MediaPaths $MediaPaths, Caption $Caption, Framework $Framework )
$Images Devise\Media\Images\Images
$MediaPaths Devise\Media\MediaPaths
$Caption Devise\Media\Helpers\Caption
$Framework Devise\Support\Framework

createThumbnailOfImage() защищенный Метод

Create a version of this thumbnail, crops too when $crop is set to true
protected createThumbnailOfImage ( Field $field, $input ) : string
$field Field
Результат string

createVersionOfImage() защищенный Метод

Create a version of this image, crops too when $crop is set to true
protected createVersionOfImage ( Field $field, $input ) : string
$field Field
Результат string

croppedImagePath() защищенный Метод

Creates a cropped versioned copy of this image
protected croppedImagePath ( Field $field, $type = 'image' ) : string
$field Field
Результат string

handle() публичный Метод

This is called anytime after we update an image field in devise
public handle ( Field $field, array $input, $beforeChanges ) : array
$field Field
$input array
Результат array

resizedImagePath() защищенный Метод

Create a version of this thumbnail, crops too when $crop is set to true
protected resizedImagePath ( Field $field, $width, $height ) : string
$field Field
Результат string

saveCaption() защищенный Метод

Save or overwrite caption file for image
protected saveCaption ( $imagePath, array $input ) : string
$input array
Результат string

versionedImagePath() защищенный Метод

Creates a versioned copy of this image
protected versionedImagePath ( Field $field ) : string
$field Field
Результат string