propel-bundle/Form/PropelExtension.php

38 lines
887 B
PHP
Raw Normal View History

2013-12-12 16:01:41 +01:00
<?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.
*/
2016-02-11 19:14:03 +01:00
namespace Propel\Bundle\PropelBundle\Form;
2013-12-12 16:01:41 +01:00
use Symfony\Component\Form\AbstractExtension;
use Symfony\Component\PropertyAccess\PropertyAccess;
/**
* Represents the Propel form extension, which loads the Propel functionality.
*
* @author Joseph Rouff <rouffj@gmail.com>
*/
class PropelExtension extends AbstractExtension
{
protected function loadTypes()
{
return array(
2015-08-06 19:02:55 +02:00
new Type\ModelType(PropertyAccess::createPropertyAccessor()),
2013-12-12 16:01:41 +01:00
new Type\TranslationCollectionType(),
new Type\TranslationType()
);
}
protected function loadTypeGuesser()
{
return new TypeGuesser();
}
}