<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

$config['crud_examples'] = [
    [
        'name'   => 'Slider',
        'fields' => [
            [
                'field'      => 'image',
                'display_as' => 'Image',
                'callback'   => 'ccc_set_image_upload',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'title',
                'display_as' => 'Title',
                'callback'   => 'ccc_edit_link',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'short_desc',
                'display_as' => 'Short description',
                'callback'   => 'ccc_textarea',
                'not_null'   => false,
                'in_column'  => true,
            ],
            [
                'field'      => 'view_order',
                'display_as' => 'View order',
                'callback'   => 'ccc_view_order',
                'not_null'   => false,
                'in_column'  => true,
            ],
            [
                'field'      => 'url',
                'display_as' => 'URL',
                'callback'   => 'ccc_url',
                'not_null'   => false,
                'in_column'  => true,
            ],
            [
                'field'      => 'active',
                'display_as' => 'Active',
                'callback'   => 'ccc_active',
                'not_null'   => false,
                'in_column'  => true,
            ],
        ],
    ],
    [
        'name'   => 'News (simple)',
        'fields' => [
            [
                'field'      => 'thumbnail',
                'display_as' => 'Thumbnail',
                'callback'   => 'ccc_set_image_upload',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'title',
                'display_as' => 'Title',
                'callback'   => 'ccc_edit_link',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'short_desc',
                'display_as' => 'Short description',
                'callback'   => 'ccc_textarea',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'detail',
                'display_as' => 'Detail',
                'callback'   => 'ccc_texteditor',
                'not_null'   => true,
                'in_column'  => false,
            ],
            [
                'field'      => 'id_resource_type_page',
                'display_as' => 'Page',
                'callback'   => 'ccc_respage',
                'not_null'   => false,
                'in_column'  => false,
            ],
        ],
    ],
    [
        'name'   => 'News (multi language)',
        'fields' => [
            [
                'field'      => 'thumbnail',
                'display_as' => 'Thumbnail',
                'callback'   => 'ccc_set_image_upload',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'title',
                'display_as' => 'Title',
                'callback'   => 'ccc_multilang',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'short_desc',
                'display_as' => 'Short description',
                'callback'   => 'ccc_multilang',
                'not_null'   => true,
                'in_column'  => true,
            ],
            [
                'field'      => 'detail',
                'display_as' => 'Detail',
                'callback'   => 'ccc_multilang',
                'not_null'   => true,
                'in_column'  => false,
            ],
            [
                'field'      => 'id_resource_type_page',
                'display_as' => 'Page',
                'callback'   => 'ccc_respage',
                'not_null'   => false,
                'in_column'  => false,
            ],
        ],
    ],
];
