Properties

$save_archival

$save_archival : 

Type

$value

$value : 

Type

$initialized

$initialized : 

Type

$config

$config : array

Type

array

Methods

recreate()

recreate() 

save()

save() 

{@inheritdoc}

load()

load() : mixed

Returns

mixed —

Current value

set_value()

set_value(  $value) 

Parameters

$value

get_value()

get_value() 

__construct()

__construct(\midcom_core_dbaobject  $object, array  $config) 

Parameters

\midcom_core_dbaobject $object
array $config

get_attachment()

get_attachment(array  $data, array  $existing, string  $identifier) : \midcom_db_attachment

Parameters

array $data
array $existing
string $identifier

Returns

\midcom_db_attachment

convert_to_web_type()

convert_to_web_type(array  $data) 

Automatically convert the uploaded file to a web-compatible type. Uses only the first image of multi-page uploads (like PDFs). The original_tmpname file is manipulated directly.

Uploaded GIF, PNG and JPEG files are left untouched.

In case of any conversions being done, the new extension will be appended to the uploaded file.

Parameters

array $data

set_imagedata()

set_imagedata(\midcom_db_attachment  $attachment) 

Parameters

\midcom_db_attachment $attachment

apply_filter()

apply_filter(\midcom_db_attachment  $source, string  $filterchain, \midcom_db_attachment  $target = null) 

Applies a filter chain

Parameters

\midcom_db_attachment $source

The image to apply to

string $filterchain

The midcom_helper_imagefilter filter chain to apply

\midcom_db_attachment $target

The attachment where the changes should be saved

generate_unique_name()

generate_unique_name(  $filename) 

Make sure we have unique filename

Parameters

$filename

save_attachment_list()

save_attachment_list() : boolean

Returns

boolean

load_attachment_list()

load_attachment_list() : array

Returns

array

prepare_attachment()

prepare_attachment(\midcom_db_attachment  $attachment, string  $filename, string  $title, string  $mimetype) 

Parameters

\midcom_db_attachment $attachment
string $filename
string $title
string $mimetype

Throws

\midcom_error

cast()

cast(  $value) 

Parameters

$value

get_derived_images()

get_derived_images() : array<mixed,string>

Returns

array<mixed,string>

create_main_image()

create_main_image(array  $data, array  $existing) 

Parameters

array $data
array $existing