public function addHistory($user, $type, $message = '', $param = array()) { connectionUserHistoryModel::create()->insert(array('user' => (int) $user, 'type' => $type, 'message' => $message, 'param' => serialize($param), 'date' => (int) strtotime('now'))); }
function execute() { $history = connectionUserHistoryModel::create()->get((int) Request::get('id')); $this->smarty->assign('history', $history); }