Файл: 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->registry, PropertyAccess::createPropertyAccessor()),
);
}
protected function loadTypeGuesser()
{
return new DoctrineOrmTypeGuesser($this->registry);
}
}