private function _init_structure($panels, $user_options = array())
 {
     $this->_structure = parent::array_to_object($this->_structure);
     $this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
     $this->_structure->id = parent::create_id(true);
     $this->_structure->panel = $panels;
 }
 private function _init_structure($data, $user_options, $widget_title)
 {
     $this->_structure = parent::array_to_object($this->_structure);
     $this->_structure->data = $data;
     $this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
     $uid = parent::create_id(true);
     $this->_structure->id = $uid;
     // set the id as default id
     $this->_uid = $uid;
     $ui = new parent();
     $this->_structure->widget = $ui->create_widget();
     $this->_structure->widget->header('icon', 'fa-table')->header('title', $widget_title)->body("class", "no-padding")->body("editbox", '<input class="form-control" type="text">
                     <span class="note"><i class="fa fa-check text-success"></i> Change title to update and save instantly!</span>');
     if (!$this->_structure->data) {
         $col_list = array("No Data");
     } else {
         $col_list = array_keys(is_object($data[0]) ? get_object_vars($data[0]) : $data[0]);
     }
     $cols = array_combine($col_list, $col_list);
     $cells = array_fill_keys($col_list, array());
     $hide = array_fill_keys($col_list, false);
     $this->_cells_map = $cells;
     $this->_cols_map = $cols;
     $this->_hide_map = $hide;
     $this->_structure->col = $cols;
     $this->_structure->cell = $cells;
     $this->_structure->hide = $hide;
     $this->_structure->row = array_fill(1, count($data) + 1, array());
     $this->_structure->js = array("properties" => array(), "oTable" => 'oTable_' . $this->_uid, "custom" => "");
 }
 private function _init_structure($items, $style = 'slide', $user_options = array())
 {
     $this->_structure = parent::array_to_object($this->_structure);
     $this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
     $this->_structure->id = parent::create_id(true);
     $this->_structure->item = $items;
     $this->_structure->options['style'] = $style;
 }
 private function _init_structure($steps, $user_options = array())
 {
     $this->_structure = parent::array_to_object($this->_structure);
     $this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
     $this->_structure->step = $steps;
     $this->_structure->id = parent::create_id(true);
     $ui = new parent();
     $widget = $ui->create_widget();
     $widget->options('editbutton', false)->header('title', '<h2></h2>');
     $this->_structure->widget = $widget;
 }
 private function _init_structure($user_options, $user_contents)
 {
     $this->_structure = parent::array_to_object($this->_structure);
     $user_contents_map = array("header" => array(), "body" => "", "color" => "");
     $new_user_contents = parent::set_array_prop_def($user_contents_map, $user_contents);
     $this->_structure->options = parent::set_array_prop_def($this->_options_map, $user_options);
     $body_structure = array("editbox" => "", "content" => "", "class" => "", "toolbar" => null, "footer" => null);
     $this->_structure->body = parent::set_array_prop_def($body_structure, $new_user_contents["body"], "content");
     $header_structure = array("icon" => null, "class" => "", "title" => "", "toolbar" => array());
     $this->_structure->header = parent::set_array_prop_def($header_structure, $new_user_contents["header"], "title");
     $this->_structure->color = $new_user_contents["color"];
     $this->_structure->id = parent::create_id(true);
 }
Esempio n. 6
0
 private function _init_structure($nav_items)
 {
     $this->_structure = parent::array_to_object($this->_structure);
     $this->_structure->nav = $nav_items;
     $this->_structure->id = parent::create_id(true);
 }