当前位置: 首页>>代码示例>>PHP>>正文


PHP BackendUserAuthentication::writelog方法代码示例

本文整理汇总了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);
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:34,代码来源:DataHandler.php


注:本文中的TYPO3\CMS\Core\Authentication\BackendUserAuthentication::writelog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。