]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
Convert array + phpDoc
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / NewEntryType.php
index fbce13f1fe0cd97b73f29bde1b4cc4ebfe4bb840..7d74fee349b0e96a1fa7495f47fbf322f1941725 100644 (file)
@@ -3,7 +3,6 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
-use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\Extension\Core\Type\UrlType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -13,16 +12,18 @@ class NewEntryType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('url', UrlType::class, array('required' => true))
-            ->add('save', SubmitType::class)
+            ->add('url', UrlType::class, [
+                'required' => true,
+                'label' => 'entry.new.form_new.url_label',
+            ])
         ;
     }
 
     public function configureOptions(OptionsResolver $resolver)
     {
-        $resolver->setDefaults(array(
+        $resolver->setDefaults([
             'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
-        ));
+        ]);
     }
 
     public function getBlockPrefix()