<?php
/**
 * Compiler pass to fix Choice field 
 *
 * @author Elze Kool <info@visualmedia.nl>
 */

namespace VisualM\ManagementBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;

/**
 * Compiler pass to fix Choice field 
 *
 * @author Elze Kool <info@visualmedia.nl>
 */
class FixChoiceFieldCompilerPass implements CompilerPassInterface
{
    /**
     * {@inheritDoc}
     */
    public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('form.type.choice')) {
            return;
        }

        $definition = $container->getDefinition(
            'form.type.choice'
        );

        $definition->setClass('VisualM\\ManagementBundle\\Form\\Type\\ChoiceType');


    }
}