Commit 5e396169 authored by Tobias Munk's avatar Tobias Munk

added audit trail behavior

parent 47563781
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
"yiisoft/yii2": "2.*", "yiisoft/yii2": "2.*",
"yiisoft/yii2-twig": "^2.0.4", "yiisoft/yii2-twig": "^2.0.4",
"dmstr/yii2-web": ">=0.3.1", "dmstr/yii2-web": ">=0.3.1",
"beowulfenator/yii2-json-editor": "^1.1" "beowulfenator/yii2-json-editor": "^1.1",
"bedezign/yii2-audit": "^1.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
......
...@@ -11,6 +11,16 @@ use yii\helpers\ArrayHelper; ...@@ -11,6 +11,16 @@ use yii\helpers\ArrayHelper;
*/ */
class WidgetContent extends BaseWidget class WidgetContent extends BaseWidget
{ {
public function behaviors()
{
return ArrayHelper::merge(
parent::behaviors(),
[
'bedezign\yii2\audit\AuditTrailBehavior'
]
);
}
/** /**
* @inheritdoc * @inheritdoc
* @return array * @return array
......
...@@ -13,6 +13,16 @@ use yii\helpers\Json; ...@@ -13,6 +13,16 @@ use yii\helpers\Json;
*/ */
class WidgetTemplate extends BaseWidgetTemplate class WidgetTemplate extends BaseWidgetTemplate
{ {
public function behaviors()
{
return ArrayHelper::merge(
parent::behaviors(),
[
'bedezign\yii2\audit\AuditTrailBehavior'
]
);
}
public function rules() public function rules()
{ {
return ArrayHelper::merge( return ArrayHelper::merge(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment