$map
$map : array<mixed,\midcom_db_attachment>
Experimental storage class
$map : array<mixed,\midcom_db_attachment>
$object : \midcom_core_dbaobject
__construct(\midcom_core_dbaobject $object, array $config)
\midcom_core_dbaobject | $object | |
array | $config |
set_imagedata(\midcom_db_attachment $attachment)
\midcom_db_attachment | $attachment |
apply_filter(\midcom_db_attachment $source, string $filterchain, \midcom_db_attachment $target = null)
Applies a filter chain
\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 |
prepare_attachment(\midcom_db_attachment $attachment, string $filename, string $title, string $mimetype)
\midcom_db_attachment | $attachment | |
string | $filename | |
string | $title | |
string | $mimetype |
get_attachment(array $data, array $existing, string $identifier) : \midcom_db_attachment
array | $data | |
array | $existing | |
string | $identifier |
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.
array | $data |