Вход Регистрация
Файл: symfony-2.7/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php
Строк: 48
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace SymfonyBridgeDoctrineForm;

use 
DoctrineCommonPersistenceManagerRegistry;
use 
SymfonyBridgeDoctrineFormTypeEntityType;
use 
SymfonyComponentFormAbstractExtension;
use 
SymfonyComponentPropertyAccessPropertyAccess;

class 
DoctrineOrmExtension extends AbstractExtension
{
    protected 
$registry;

    public function 
__construct(ManagerRegistry $registry)
    {
        
$this->registry $registry;
    }

    protected function 
loadTypes()
    {
        return array(
            new 
EntityType($this->registryPropertyAccess::createPropertyAccessor()),
        );
    }

    protected function 
loadTypeGuesser()
    {
        return new 
DoctrineOrmTypeGuesser($this->registry);
    }
}
Онлайн: 3
Реклама