This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function addBatchData($batchData, $compact = true) | |
{ | |
$columns = ['entry_id', 'type', 'data']; | |
$rows = []; | |
foreach ($batchData as $type => $data) { | |
$rows[] = [$this->id, $type, [Helper::serialize($data, $compact), \PDO::PARAM_LOB]]; | |
} | |
static::getDb()->createCommand()->batchInsert(AuditData::tableName(), $columns, $rows)->execute(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Error Handler allows errors to be logged to the audit_error table. | |
*/ | |
namespace bedezign\yii2\audit\components\base; | |
use bedezign\yii2\audit\Audit; | |
use bedezign\yii2\audit\models\AuditError; | |
use Exception; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActiveRecord extends CActiveRecord | |
{ | |
public static function model($sClassName = NULL) | |
{ | |
if ($sClassName == NULL) | |
$sClassName = get_called_class(); | |
$oModel = parent::model($sClassName); | |
$oModel->resetScope(); | |
$oModel->setDbCriteria(new CDbCriteria($oModel->defaultScope())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title> - jsFiddle demo</title> | |
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.2.1/css/foundation.min.css"> | |
<script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
<script type='text/javascript' src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.2.1/js/foundation/foundation.min.js"></script> | |
<script type='text/javascript' src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.2.1/js/foundation/foundation.reveal.js"></script> | |
<script type='text/javascript'>//<![CDATA[ |
NewerOlder