for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Victoire\Bundle\FormBundle\Form\Extension;
/*
* This file is part of the MopaBootstrapBundle.
*
* (c) Philipp A. Mohrenweiser <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Extension for Offsetting a button.
* @author peshi <[email protected]>
class OffsetButtonExtension extends AbstractTypeExtension
{
* {@inheritdoc}
public function getExtendedType()
return ButtonType::class;
}
public function configureOptions(OptionsResolver $resolver)
$resolver->setDefaults(
[
'vic_button_offset' => null,
]
);
public function buildView(FormView $view, FormInterface $form, array $options)
$view->vars['vic_button_offset'] = $options['vic_button_offset'];