58 $this->FieldRenderer(
$form);
79 $this->_startField(
$field);
85 echo
"<img src='/action/image/iconize?image_id=$image_id' alt=''/>";
88 $accept = $this->accept ?
" accept='{$this->accept}'" :
"";
89 echo
"<input id='{$this->parent->id}_{$field}' type='file' name='$field' value='".$this->parent->data->get(
$field).
"' size='{$this->size}'{$accept}>";
95 $this->_startField(
$field);
97 echo $this->parent->data->get(
$field);
108 if ($this->imageRecordHandler)
110 call_user_func($this->handler,
$image,
$field, $this->parent->data);
116 $image->published =
false;
119 $image->gallery_id = $this->gallery->gallery_id;
134 $this->parent->validator->add(
new RequiredFileValidator($this->
field, $this->label,
$message));
static usingFeature()
Uses the specified framework feature(s).
static imageUploadHandler($field, $image)
Upload the image file specified in the given field.
Field renderer for file upload data fields.
ImageUploadFieldRenderer(&$form, $field, $label, $gallery, $imageRecordHandler=null)