本文整理汇总了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);
}