<?php

class ccc_set_image_upload_run extends crud_callback_chunk_run
{
    public function get_callback_string()
    {
        
        return '$this->crud->set_image_upload(new image_upload(\'' . $this->field . '\', \'/assets/uploads/multimedia/images/\', 800, 600));';
    }
}

class ccc_set_image_upload implements crud_callback_chunk
{

    public function get_name()
    {
        return 'Image upload';
    }

    public function get_options()
    {
        return FALSE;
    }

    public function get_schema()
    {
        return 'varchar(255) CHARACTER SET utf8';
    }

    public function run()
    {
        return new ccc_set_image_upload_run();
    }

}
