Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

62 lines (50 sloc) 1.182 kb
<?php
namespace Propel\PropelBundle\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');
}
}
Jump to Line
Something went wrong with that request. Please try again.