This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php
Fabien Potencier 08bf2af455 fixed email
2011-04-24 13:59:46 +02:00

42 lines
855 B
PHP

<?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 Symfony\Bridge\Doctrine\Form;
use Symfony\Component\Form\AbstractExtension;
use Doctrine\ORM\EntityManager;
class DoctrineOrmExtension extends AbstractExtension
{
/**
* The Doctrine 2 entity manager
* @var Doctrine\ORM\EntityManager
*/
protected $em = null;
public function __construct(EntityManager $em)
{
$this->em = $em;
}
protected function loadTypes()
{
return array(
new Type\EntityType($this->em),
);
}
protected function loadTypeGuesser()
{
return new DoctrineOrmTypeGuesser($this->em);
}
}