blob: 7d74fee349b0e96a1fa7495f47fbf322f1941725 (
plain) (
tree)
|
|
<?php
namespace Wallabag\CoreBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\UrlType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class NewEntryType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('url', UrlType::class, [
'required' => true,
'label' => 'entry.new.form_new.url_label',
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
]);
}
public function getBlockPrefix()
{
return 'entry';
}
}
|