__construct() public method

Set the template from the table config file if it exists
public __construct ( array $config = [] ) : void
$config array (default: array())
return void
示例#1
0
 function __construct()
 {
     parent::__construct();
     $this->fields = NULL;
     $this->attributes = array('class' => 'contentTable', 'cellspacing' => 0, 'cellspadding' => 0);
     $this->template = NULL;
     $this->row_attr = array();
     $this->show_line_id = false;
     $this->trim_columns = false;
 }
示例#2
0
 /**
  * Constructor
  *
  * @access	public
  */
 function __construct()
 {
     parent::__construct();
     $this->EE =& get_instance();
     if (REQ == 'CP') {
         // @todo We have a code order issue with accessories.
         // That CP code needs to change in the near future,
         // but for now we work around it.
         $this->set_template($this->EE->session->cache('table', 'cp_template'));
     }
 }
示例#3
0
 /**
  * Class constructor
  *
  * @return	void
  */
 public function __construct($params = "")
 {
     parent::__construct();
     if (!empty($params['header'])) {
         $this->set_heading($params['header']);
     }
     if (!empty($params['class'])) {
         if (!empty($params['id'])) {
             $this->set_table_style($params['class'], $params['id']);
         } else {
             $this->set_table_style($params['class']);
         }
     }
     if (!empty($params['cell_start'])) {
         $this->set_table_cell($params['cell_start']);
     }
     $this->set_template($this->my_template);
 }