本文整理匯總了PHP中TYPO3\CMS\Core\Authentication\BackendUserAuthentication::writelog方法的典型用法代碼示例。如果您正苦於以下問題:PHP BackendUserAuthentication::writelog方法的具體用法?PHP BackendUserAuthentication::writelog怎麽用?PHP BackendUserAuthentication::writelog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Core\Authentication\BackendUserAuthentication
的用法示例。
在下文中一共展示了BackendUserAuthentication::writelog方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: log
/**
* Logging actions from TCEmain
*
* @param string $table Table name the log entry is concerned with. Blank if NA
* @param int $recuid Record UID. Zero if NA
* @param int $action Action number: 0=No category, 1=new record, 2=update record, 3= delete record, 4= move record, 5= Check/evaluate
* @param int $recpid Normally 0 (zero). If set, it indicates that this log-entry is used to notify the backend of a record which is moved to another location
* @param int $error The severity: 0 = message, 1 = error, 2 = System Error, 3 = security notice (admin)
* @param string $details Default error message in english
* @param int $details_nr This number is unique for every combination of $type and $action. This is the error-message number, which can later be used to translate error messages. 0 if not categorized, -1 if temporary
* @param array $data Array with special information that may go into $details by '%s' marks / sprintf() when the log is shown
* @param int $event_pid The page_uid (pid) where the event occurred. Used to select log-content for specific pages.
* @param string $NEWid NEW id for new records
* @return int Log entry UID (0 if no log entry was written or logging is disabled)
*/
public function log($table, $recuid, $action, $recpid, $error, $details, $details_nr = -1, $data = array(), $event_pid = -1, $NEWid = '')
{
if (!$this->enableLogging) {
return 0;
}
// Type value for tce_db.php
$type = 1;
if (!$this->storeLogMessages) {
$details = '';
}
if ($error > 0) {
$detailMessage = $details;
if (is_array($data)) {
$detailMessage = vsprintf($details, $data);
}
$this->errorLog[] = '[' . $type . '.' . $action . '.' . $details_nr . ']: ' . $detailMessage;
}
return $this->BE_USER->writelog($type, $action, $error, $details_nr, $details, $data, $table, $recuid, $recpid, $event_pid, $NEWid);
}