<?php

class ccc_file_run extends crud_callback_chunk_run
{

    public function get_callback_string()
    {
        return '$this->crud->callback(\'' . $this->field . '\', \'rtgc_upload_file\', [\'crud\' => $this->crud, \'field\' => \'' . $this->field . '\', \'upload_path\' => \'./assets/uploads\']);';
    }

}

class ccc_file implements crud_callback_chunk
{
    public function get_name()
    {
        return 'File';
    }
    
    public function get_options()
    {
        return FALSE;
    }
    
    public function get_schema()
    {
        return 'varchar(255) CHARACTER SET utf8';
    }

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