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


PHP Logs::LogMsg方法代码示例

本文整理汇总了PHP中Logs::LogMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP Logs::LogMsg方法的具体用法?PHP Logs::LogMsg怎么用?PHP Logs::LogMsg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Logs的用法示例。


在下文中一共展示了Logs::LogMsg方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: boot

 public static function boot()
 {
     parent::boot();
     static::created(function ($record) {
         $kitTypeID = $record->KitType;
         $kitID = $record->ID;
         Logs::LogMsg(4, $kitTypeID, $kitID, null, "Created Kit: " . $record->Name);
         return true;
     });
     static::updating(function ($record) {
         $kitTypeID = $record->KitType;
         $kitID = $record->ID;
         $dirty = $record->getDirty();
         foreach ($dirty as $field => $newdata) {
             $olddata = $record->getOriginal($field);
             if ($olddata != $newdata) {
                 Logs::LogMsg(5, $kitTypeID, $kitID, null, "Changed Kit field: " . $field . " From:" . $olddata . " To:" . $newdata);
             }
         }
         return true;
     });
     static::deleting(function ($record) {
         $kitTypeID = $record->KitType;
         $kitID = $record->ID;
         Logs::LogMsg(6, $kitTypeID, $kitID, null, "Deleted Kit: " . $record->Name);
         return true;
     });
 }
开发者ID:KWinston,项目名称:EPLProject,代码行数:28,代码来源:Kits.php

示例2: boot

 public static function boot()
 {
     parent::boot();
     static::created(function ($record) {
         $kitTypeID = $record->kit->KitType;
         $kitID = $record->kit->ID;
         Logs::LogMsg(10, $kitTypeID, $kitID, $record->ID, "Added content: " . $record->Name);
         return true;
     });
     static::updating(function ($record) {
         $kitTypeID = $record->kit->KitType;
         $kitID = $record->kit->ID;
         $dirty = $record->getDirty();
         foreach ($dirty as $field => $newdata) {
             $olddata = $record->getOriginal($field);
             if ($olddata != $newdata) {
                 Logs::LogMsg(11, $kitTypeID, $kitID, $record->ID, "Changed " . $field . " From:" . $olddata . " To:" . $newdata);
             }
         }
         return true;
     });
     static::deleting(function ($record) {
         $kitTypeID = $record->kit->KitType;
         $kitID = $record->kit->ID;
         Logs::LogMsg(12, $kitTypeID, $kitID, $record->ID, "Removed Contents: " . $record->Name);
         return true;
     });
 }
开发者ID:KWinston,项目名称:EPLProject,代码行数:28,代码来源:KitContents.php

示例3: boot

 public static function boot()
 {
     parent::boot();
     static::created(function ($record) {
         $userName = "";
         if (isset($record->UserID)) {
             $userName = User::find($record->UserID)->username;
         } else {
             $userName = $record->Email;
         }
         $primaryBooker = " as primary booker";
         if (!$record->Booker) {
             $primaryBooker = " as secondary contact";
         }
         Logs::LogMsg(18, $record->booking->kit->KitType, $record->booking->kit->ID, $record->booking->branch->ID, "Added user:" . $userName . $primaryBooker);
         return true;
     });
     static::updating(function ($record) {
         $dirty = $record->getDirty();
         foreach ($dirty as $field => $newdata) {
             $olddata = $record->getOriginal($field);
             if ($olddata != $newdata) {
                 Logs::LogMsg(19, $record->booking->kit->KitType, $record->booking->kit->ID, $record->booking->branch->ID, $field . " changed From:" . $olddata . " To:" . $newdata);
             }
         }
         return true;
     });
     static::deleting(function ($record) {
         Logs::LogMsg(20, $record->booking->kit->KitType, $record->booking->kit->ID, $record->booking->branch->ID, "Detail deleted by:" . Auth::user()->username);
         return true;
     });
 }
开发者ID:KWinston,项目名称:EPLProject,代码行数:32,代码来源:BookingDetails.php

示例4: boot

 public static function boot()
 {
     parent::boot();
     static::created(function ($record) {
         Logs::LogMsg(13, $record->kit->KitType, $record->kit->ID, $record->branch->ID, "Booking for:" . $record->branch->BranchID . " from:" . $record->StartDate . " To:" . $record->EndDate);
         return true;
     });
     static::updating(function ($record) {
         $dirty = $record->getDirty();
         foreach ($dirty as $field => $newdata) {
             $olddata = $record->getOriginal($field);
             if ($olddata != $newdata) {
                 Logs::LogMsg(15, $record->kit->KitType, $record->kit->ID, $record->branch->ID, "Changed booking " . $field . " From:" . $olddata . " To:" . $newdata);
             }
         }
         return true;
     });
     static::deleting(function ($record) {
         Logs::LogMsg(14, $record->kit->KitType, $record->kit->ID, $record->branch->ID, "Booking Deleted by:" . Auth::user()->username);
         return true;
     });
 }
开发者ID:KWinston,项目名称:EPLProject,代码行数:22,代码来源:Booking.php

示例5: boot

 public static function boot()
 {
     parent::boot();
     static::created(function ($record) {
         Logs::LogMsg(7, $record->ID, null, null, "Type Created");
         return true;
     });
     static::updating(function ($record) {
         $dirty = $record->getDirty();
         foreach ($dirty as $field => $newdata) {
             $olddata = $record->getOriginal($field);
             if ($olddata != $newdata) {
                 Logs::LogMsg(19, $record->ID, null, null, $field . " changed From:" . $olddata . " To:" . $newdata);
             }
         }
         return true;
     });
     static::deleting(function ($record) {
         Logs::LogMsg(20, $record->ID, null, null, "Kit type deleted by:" . Auth::user()->username);
         return true;
     });
 }
开发者ID:KWinston,项目名称:EPLProject,代码行数:22,代码来源:KitTypes.php

示例6: Note

 public static function Note($KityTypeID, $KitID, $ContentsID, $Message)
 {
     return Logs::LogMsg(3, $KityTypeID, $KitID, $ContentsID, $Message);
 }
开发者ID:KWinston,项目名称:EPLProject,代码行数:4,代码来源:Logs.php


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