bedezign\yii2\audit\AuditTrailBehavior::cleanAttributesAllowed PHP Method

cleanAttributesAllowed() protected method

Unset attributes which are not allowed
protected cleanAttributesAllowed ( $attributes ) : mixed
$attributes
return mixed
    protected function cleanAttributesAllowed($attributes)
    {
        if (sizeof($this->allowed) > 0) {
            foreach ($attributes as $f => $v) {
                if (array_search($f, $this->allowed) === false) {
                    unset($attributes[$f]);
                }
            }
        }
        return $attributes;
    }