Hello
I'm trying to add image field. According to tutorial, this code
static $has_one = array(
'Photo' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
return $fields;
}
should work. But I'm getting error
FATAL ERROR: i18n::include_by_class: Class ImageUploader not found
At line 1258 in D:\htdocs\pss\sapphire\core\i18n.php
user_error(i18n::include_by_class: Class ImageUploader not found,512)
line 1258 of i18n.php
i18n::include_by_class(ImageUploader)
line 134 of Core.php
_t(ImageUploader.ATTACH,Attach %s,50,Attach image/file)
line 535 of Image.php
Image_Uploader->EditImageForm()
call_user_func_array(Array,Array)
In sources I've found class Image_Uploader. Is this correct name of image class? What should I do to run this code?