/** * Return the items data list. This method will be over-ridden in a sub-class. * * @brief Return the items data list * * @return array */ public function data() { if (!empty($this->model) && method_exists($this->model, 'select')) { // TODO Replave $_REQUEST with $_GET ? return $this->model->select($_REQUEST); } return array(); }
/** * Create an instance of WPDKDBListTableModel class * * @brief Construct * * @param string $table_name Optional. The name of the database table without WordPress prefix * @param string $sql_file Optional. The filename of SQL file with the database table structure and init data. * * @return WPDKDBListTableModel */ public function __construct($table_name = '', $sql_file = '') { // Init parent parent::__construct(); // Init the table model if (!empty($table_name)) { $this->table = new WPDKDBTableModel($table_name, $sql_file); } }