/** * Get pagination informations * * @access private * @param array [$to_read] */ private function get_pagination($to_read) { try { list($this->_page, $this->_limit_start) = Helper::pagination(parent::ITEMS); $to_read['columns'] = array('COUNT(POST_ID) as count'); $count = $this->_db->read($to_read); $this->_max = ceil($count[0]['count'] / parent::ITEMS); } catch (Exception $e) { $this->_action_msg = ActionMessages::custom_wrong($e->getMessage()); } }