Twig/UiExtension.php
private function getButtonOptionsResolver()
    {
        if (null === $this->buttonOptionsResolver) {
            $this->buttonOptionsResolver = new OptionsResolver();
            $this->buttonOptionsResolver
                ->setDefaults([
                    'type'    => 'button',
                    'theme'   => 'default',
                    'size'    => 'sm',
                    'icon'    => null,
                    'fa_icon' => false,
                    'path'    => null,
                ])
                ->setRequired(['type', 'theme', 'size'])

                ->setAllowedValues('type',  ['link', 'button', 'submit', 'reset'])
                ->setAllowedValues('theme', ['default', 'primary', 'success', 'warning', 'danger'])
                ->setAllowedValues('size',  ['xs', 'sm', 'md', 'lg'])

                ->setAllowedTypes('icon',    ['string', 'null'])
                ->setAllowedTypes('fa_icon', 'bool')
                ->setAllowedTypes('path',    ['string', 'null'])
            ;
        }

        return $this->buttonOptionsResolver;
    }
private function getButtonOptionsResolver()
    {
        if (null === $this->buttonOptionsResolver) {
            $this->buttonOptionsResolver = new OptionsResolver();
            $this->buttonOptionsResolver
                ->setDefaults([
                    'type'    => 'button',
                    'theme'   => 'default',
                    'size'    => 'sm',
                    'icon'    => null,
                    'fa_icon' => false,
                    'path'    => null,
                ])
                ->setRequired(['type', 'theme', 'size'])

                ->setAllowedValues('type',  ['link', 'button', 'submit', 'reset'])
                ->setAllowedValues('theme', ['default', 'primary', 'success', 'warning', 'danger'])
                ->setAllowedValues('size',  ['xs', 'sm', 'md', 'lg'])

                ->setAllowedTypes('icon',    ['string', 'null'])
                ->setAllowedTypes('fa_icon', 'bool')
                ->setAllowedTypes('path',    ['string', 'null'])
            ;
        }

        return $this->buttonOptionsResolver;
    }
Returns the button options resolver.

@return OptionsResolver