forked from wallabag/wallabag
assign tags to an entry
This commit is contained in:
committed by
Jeremy Benoist
parent
109d67dbb1
commit
7244d6cb61
30
src/Wallabag/CoreBundle/Form/Type/NewTagType.php
Normal file
30
src/Wallabag/CoreBundle/Form/Type/NewTagType.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class NewTagType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('label', 'text', array('required' => true))
|
||||
->add('save', 'submit')
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\Tag',
|
||||
));
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return 'tag';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user