public function cbInit() { # START CONFIGURATION DO NOT REMOVE THIS LINE $this->title_field = "title"; $this->limit = "20"; $this->orderby = "id,desc"; $this->global_privilege = false; $this->button_table_action = true; $this->button_bulk_action = true; $this->button_action_style = "button_icon"; $this->button_add = true; $this->button_edit = true; $this->button_delete = true; $this->button_detail = true; $this->button_show = true; $this->button_filter = true; $this->button_import = false; $this->button_export = false; $this->table = "slider"; # END CONFIGURATION DO NOT REMOVE THIS LINE # START COLUMNS DO NOT REMOVE THIS LINE $this->col = []; $this->col[] = [ "label" => "Страница", "name" => "page", "callback_php" => '$this->callback_page($row);' ]; $this->col[] = [ "label" => "Заголовок", "name" => "title" ]; $this->col[] = [ "label" => "Время задержки слайда (сек)", "name" => "time" ]; # END COLUMNS DO NOT REMOVE THIS LINE # START FORM DO NOT REMOVE THIS LINE $this->form = []; $this->form[] = [ 'label' => 'Страница', 'name' => 'page', 'type' => 'select', 'validation' => 'required', 'width' => 'col-sm-10', 'dataenum' => '/|ГЛАВНАЯ;faq|КАК ИГРАТЬ;clubs|НАШИ КЛУБЫ;schedule|ТУРНИРЫ' ]; $this->form[] = [ 'label' => 'Заголовок', 'name' => 'title', 'type' => 'text', 'validation' => 'required|string|min:3|max:255', 'width' => 'col-sm-10' ]; $this->form[] = [ 'label' => 'Время задержки слайда (сек)', 'name' => 'time', 'type' => 'number', 'validation' => 'required', 'width' => 'col-sm-10' ]; # END FORM DO NOT REMOVE THIS LINE /* | ---------------------------------------------------------------------- | Sub Module | ---------------------------------------------------------------------- | @label = Label of action | @path = Path of sub module | @foreign_key = foreign key of sub table/module | @button_color = Bootstrap Class (primary,success,warning,danger) | @button_icon = Font Awesome Class | @parent_columns = Sparate with comma, e.g : name,created_at | */ $this->sub_module = array(); /* | ---------------------------------------------------------------------- | Add More Action Button / Menu | ---------------------------------------------------------------------- | @label = Label of action | @url = Target URL, you can use field alias. e.g : [id], [name], [title], etc | @icon = Font awesome class icon. e.g : fa fa-bars | @color = Default is primary. (primary, warning, succecss, info) | @showIf = If condition when action show. Use field alias. e.g : [id] == 1 | */ $this->addaction = array(); /* | ---------------------------------------------------------------------- | Add More Button Selected | ---------------------------------------------------------------------- | @label = Label of action | @icon = Icon from fontawesome | @name = Name of button | Then about the action, you should code at actionButtonSelected method | */ $this->button_selected = array(); /* | ---------------------------------------------------------------------- | Add alert message to this module at overheader | ---------------------------------------------------------------------- | @message = Text of message | @type = warning,success,danger,info | */ $this->alert = array(); /* | ---------------------------------------------------------------------- | Add more button to header button | ---------------------------------------------------------------------- | @label = Name of button | @url = URL Target | @icon = Icon from Awesome. | */ $this->index_button = array(); /* | ---------------------------------------------------------------------- | Customize Table Row Color | ---------------------------------------------------------------------- | @condition = If condition. You may use field alias. E.g : [id] == 1 | @color = Default is none. You can use bootstrap success,info,warning,danger,primary. | */ $this->table_row_color = array(); /* | ---------------------------------------------------------------------- | You may use this bellow array to add statistic at dashboard | ---------------------------------------------------------------------- | @label, @count, @icon, @color | */ $this->index_statistic = array(); /* | ---------------------------------------------------------------------- | Add javascript at body | ---------------------------------------------------------------------- | javascript code in the variable | $this->script_js = "function() { ... }"; | */ $this->script_js = NULL; /* | ---------------------------------------------------------------------- | Include HTML Code before index table | ---------------------------------------------------------------------- | html code to display it before index table | $this->pre_index_html = "

test

"; | */ $this->pre_index_html = null; /* | ---------------------------------------------------------------------- | Include HTML Code after index table | ---------------------------------------------------------------------- | html code to display it after index table | $this->post_index_html = "

test

"; | */ $this->post_index_html = null; /* | ---------------------------------------------------------------------- | Include Javascript File | ---------------------------------------------------------------------- | URL of your javascript each array | $this->load_js[] = asset("myfile.js"); | */ $this->load_js = array(); /* | ---------------------------------------------------------------------- | Add css style at body | ---------------------------------------------------------------------- | css code in the variable | $this->style_css = ".style{....}"; | */ $this->style_css = NULL; /* | ---------------------------------------------------------------------- | Include css File | ---------------------------------------------------------------------- | URL of your css each array | $this->load_css[] = asset("myfile.css"); | */ $this->load_css = array(); }