PHP Class Devise\Pages\Fields\Handlers\ImageFieldUpdated

Afficher le fichier Open project: devisephp/cms Class Usage Examples

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
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

Method Details

__construct() public méthode

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() protected méthode

Create a version of this thumbnail, crops too when $crop is set to true
protected createThumbnailOfImage ( Field $field, $input ) : string
$field Field
Résultat string

createVersionOfImage() protected méthode

Create a version of this image, crops too when $crop is set to true
protected createVersionOfImage ( Field $field, $input ) : string
$field Field
Résultat string

croppedImagePath() protected méthode

Creates a cropped versioned copy of this image
protected croppedImagePath ( Field $field, $type = 'image' ) : string
$field Field
Résultat string

handle() public méthode

This is called anytime after we update an image field in devise
public handle ( Field $field, array $input, $beforeChanges ) : array
$field Field
$input array
Résultat array

resizedImagePath() protected méthode

Create a version of this thumbnail, crops too when $crop is set to true
protected resizedImagePath ( Field $field, $width, $height ) : string
$field Field
Résultat string

saveCaption() protected méthode

Save or overwrite caption file for image
protected saveCaption ( $imagePath, array $input ) : string
$input array
Résultat string

versionedImagePath() protected méthode

Creates a versioned copy of this image
protected versionedImagePath ( Field $field ) : string
$field Field
Résultat string