<?php

namespace onespace\core\behaviours;

use bedezign\yii2\audit\AuditTrailBehavior as BaseAuditTrailBehavior;
use Yii;

/**
 * @psalm-api
 * 
 * Override the default behaviour of audit module
 */
class AuditTrailBehaviour extends BaseAuditTrailBehavior {
    public $active = true;

    /**
     * @param array $config
     */
    public function __construct($config) {
        $this->active = Yii::$app->params['auditEnabled']['trails'];
        parent::__construct($config);
    }
}
