for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sonata project.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\DoctrinePHPCRAdminBundle;
use Sonata\CoreBundle\Form\FormHelper;
use Sonata\DoctrinePHPCRAdminBundle\DependencyInjection\Compiler\AddGuesserCompilerPass;
use Sonata\DoctrinePHPCRAdminBundle\DependencyInjection\Compiler\AddTemplatesCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class SonataDoctrinePHPCRAdminBundle extends Bundle
{
/**
* @param ContainerBuilder $container
public function build(ContainerBuilder $container)
$this->registerFormMapping();
$container->addCompilerPass(new AddGuesserCompilerPass());
$container->addCompilerPass(new AddTemplatesCompilerPass());
}
* {@inheritdoc}
public function boot()
private function registerFormMapping()
FormHelper::registerFormTypeMapping(array(
'doctrine_phpcr_type_filter_choice' => 'Sonata\DoctrinePHPCRAdminBundle\Form\Type\Filter\ChoiceType',
'choice_field_mask' => 'Sonata\DoctrinePHPCRAdminBundle\Form\Type\ChoiceFieldMaskType',
'doctrine_phpcr_odm_tree_manager' => 'Sonata\DoctrinePHPCRAdminBundle\Form\Type\TreeManagerType',
'doctrine_phpcr_odm_tree' => 'Sonata\DoctrinePHPCRAdminBundle\Form\Type\TreeModelType',
));