/**
  * Constructor
  *
  * @access      public
  * @return      void
  */
 function __construct()
 {
     // Call parent constructor
     parent::__construct();
     // Initialize this model
     $this->initialize('low_reorder_orders', array('set_id', 'cat_id'), array('sort_order' => 'TEXT'));
 }
예제 #2
0
 /**
  * Installs given table
  *
  * @access      public
  * @return      void
  */
 public function install()
 {
     // Call parent install
     parent::install();
     // Add indexes to table
     ee()->db->query("ALTER TABLE {$this->table()} ADD INDEX (`site_id`)");
     ee()->db->query("ALTER TABLE {$this->table()} ADD INDEX (`set_name`)");
 }
예제 #3
0
 /**
  * Constructor
  *
  * @access     public
  * @return     void
  */
 public function __construct()
 {
     // -------------------------------------
     //  Define the package path
     // -------------------------------------
     ee()->load->add_package_path(PATH_THIRD . $this->package);
     // -------------------------------------
     //  Load helper
     // -------------------------------------
     ee()->load->helper($this->package);
     // -------------------------------------
     //  Libraries
     // -------------------------------------
     ee()->load->library('Low_reorder_model');
     // -------------------------------------
     //  Load the models
     // -------------------------------------
     Low_reorder_model::load_models();
     // -------------------------------------
     //  Set main class name
     // -------------------------------------
     $this->class_name = ucfirst($this->package);
     // -------------------------------------
     //  Get site shortcut
     // -------------------------------------
     $this->site_id = (int) ee()->config->item('site_id');
     // -------------------------------------
     //  Get member group shortcut
     // -------------------------------------
     $this->member_group = (int) @ee()->session->userdata['group_id'];
 }