public static function addAttributeClass($view, $class, $prepend = false, $key = 'attr')
    {
        if ($view instanceof BlockView || $view instanceof FormView) {
            $attr = isset($view->vars[$key]) ? $view->vars[$key] : [];
            $attrClass = isset($attr['class']) ? $attr['class'] : '';
            $attrClass = $prepend ? trim($class.' '.$attrClass) : trim($attrClass.' '.$class);

            static::addAttribute($view, 'class', $attrClass, $key);
        }
    }