<?php


namespace AutoAdmin\Bundle\Admin\Form\Type\Component;


use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormView;

abstract class AbstractHelperType extends AbstractType
{
    protected function addViewClass(FormView $view, string $class)
    {
        $view->vars['attr'] = array_merge(
            $view->vars['attr'],
            [
                'class' => ($view->vars['attr']['class'] ?? '') . ' ' . $class,
            ]
        );
    }
}
