abstract class ImageUploadTransformationsPlugin extends IOTransformationsPlugin (View source)

Provides common methods for all of the image upload transformations plugins.

Properties

protected bool $success

Specifies whether transformation was successful or not.

from  IOTransformationsPlugin
protected string $error

To store the error message in case of failed transformations.

from  IOTransformationsPlugin

Methods

bool
applyTransformationNoWrap(array $options = [])

Returns true if the element requires no wrapping

array
getOptions(array $options, array $defaults)

Returns passed options or default values if they were not set

string
getInputHtml(string $columnNameAppendix, array $options, string $value, int $fieldIndex)

Returns the html for input field to override default textarea.

array
getScripts()

Returns the array of scripts (filename) required for plugin initialization and handling

string
getError()

Returns the error message

bool
isSuccess()

Returns the success status

void
reset()

Resets the object properties

static string
getInfo()

Gets the transformation description of the specific plugin

string
applyTransformation(string $buffer, array $options = [], FieldMetadata|null $meta = null)

Does the actual work of each specific transformations plugin.

static string
getName()

Gets the transformation name of the specific plugin

Details

bool applyTransformationNoWrap(array $options = [])

Returns true if the element requires no wrapping

Parameters

array $options

transformation options

Return Value

bool

array getOptions(array $options, array $defaults)

Returns passed options or default values if they were not set

Parameters

array $options

List of passed options

array $defaults

List of default values

Return Value

array

List of options possibly filled in by defaults.

string getInputHtml(string $columnNameAppendix, array $options, string $value, int $fieldIndex)

Returns the html for input field to override default textarea.

Note: Return empty string if default textarea is required.

Parameters

string $columnNameAppendix

the name attribute

array $options

transformation options

string $value

Current field value

int $fieldIndex

field index

Return Value

string

the html for input field

array getScripts()

Returns the array of scripts (filename) required for plugin initialization and handling

Return Value

array

javascripts to be included

string getError()

Returns the error message

Return Value

string error

bool isSuccess()

Returns the success status

Return Value

bool

void reset()

Resets the object properties

Return Value

void

static string getInfo()

Gets the transformation description of the specific plugin

Return Value

string

string applyTransformation(string $buffer, array $options = [], FieldMetadata|null $meta = null)

Does the actual work of each specific transformations plugin.

Parameters

string $buffer

text to be transformed

array $options

transformation options

FieldMetadata|null $meta

meta information

Return Value

string

the transformed text

static string getName()

Gets the transformation name of the specific plugin

Return Value

string