44 lines
935 B
PHP
44 lines
935 B
PHP
<?php
|
||
|
||
namespace Trinity\Bundle\ContentManagerBundle\Form\Type;
|
||
|
||
use Propel\PropelBundle\Form\BaseAbstractType;
|
||
use Symfony\Component\Form\FormBuilderInterface;
|
||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||
|
||
class BlockType extends BaseAbstractType
|
||
{
|
||
protected $options = array(
|
||
'data_class' => 'Trinity\Bundle\ContentManagerBundle\Model\Block',
|
||
);
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||
{
|
||
$builder->add(
|
||
'value',
|
||
'text',
|
||
array(
|
||
'required' => false,
|
||
)
|
||
);
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||
{
|
||
$resolver->setDefaults($this->options);
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function getName()
|
||
{
|
||
return 'block';
|
||
}
|
||
}
|