protected function _setData() { global $lC_Database, $lC_Language; if (!$this->enabled) { $this->_data = ''; } else { $this->_data = '<div class="four-columns six-columns-tablet twelve-columns-mobile clear-both">' . ' <h2 class="relative thin">' . $this->_title . '</h2>' . ' <ul class="list spaced">'; $counter = 0; foreach (lc_toObjectInfo(lC_ErrorLog_Admin::getAll())->get('entries') as $log) { $counter++; $this->_data .= ' <li>' . ' <span class="list-link icon-warning icon-red" title="' . $lC_Language->get('orders') . '">' . ' <strong>' . lc_output_string_protected($log['date']) . '</strong> ' . lc_output_string_protected(substr($log['message'], 0, 20)) . ' </span>' . ' </li>'; if ($counter == 6) { break; } } $this->_data .= ' </ul>' . '</div>'; } }
public static function getAll() { $result = lC_ErrorLog_Admin::getAll(); $result['rpcStatus'] = RPC_STATUS_SUCCESS; echo json_encode($result); }