Browse files

moved BaseAbstractType from Model\Form to Form

  • Loading branch information...
1 parent accb888 commit 6bac31199836fa033497b57377e3817339d2b988 @redexp redexp committed Nov 10, 2012
Showing with 1 addition and 62 deletions.
  1. +0 −61 Model/Form/BaseAbstractType.php
  2. +1 −1 Resources/skeleton/FormType.php
View
61 Model/Form/BaseAbstractType.php
@@ -1,61 +0,0 @@
-<?php
-
-namespace Propel\PropelBundle\Model\Form;
-
-use Symfony\Component\Form\AbstractType;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-
-abstract class BaseAbstractType extends AbstractType
-{
- protected $options = array(
- 'name' => '',
- );
-
- function __construct($mergeOptions = null)
- {
- if ($mergeOptions) {
- $this->mergeOptions($mergeOptions);
- }
- }
-
- public function setOption($name, $value)
- {
- $this->options[$name] = $value;
- }
-
- public function getOption($name)
- {
- return $this->options[$name];
- }
-
- public function setOptions($options)
- {
- $this->options = $options;
- }
-
- public function getOptions()
- {
- return $this->options;
- }
-
- public function mergeOptions($options)
- {
- $this->options = array_merge($this->options, $options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver)
- {
- $resolver->setDefaults($this->options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return $this->getOption('name');
- }
-}
View
2 Resources/skeleton/FormType.php
@@ -2,7 +2,7 @@
namespace ##NAMESPACE##;
-use Propel\PropelBundle\Model\Form\BaseAbstractType;
+use Propel\PropelBundle\Form\BaseAbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class ##CLASS## extends BaseAbstractType

0 comments on commit 6bac311

Please sign in to comment.