wallabag/src/Form/Type/FeedType.php

38 lines
942 B
PHP
Raw Permalink Normal View History

2015-03-28 13:27:45 +00:00
<?php
2015-05-30 11:52:26 +00:00
2024-02-19 00:30:12 +00:00
namespace Wallabag\Form\Type;
2015-03-28 13:27:45 +00:00
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
2015-03-28 13:27:45 +00:00
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
2024-02-19 00:30:12 +00:00
use Wallabag\Entity\Config;
2015-03-28 13:27:45 +00:00
class FeedType extends AbstractType
2015-03-28 13:27:45 +00:00
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('feed_limit', null, [
'label' => 'config.form_feed.feed_limit',
'property_path' => 'feedLimit',
])
->add('save', SubmitType::class, [
'label' => 'config.form.save',
])
2015-03-28 13:27:45 +00:00
;
}
public function configureOptions(OptionsResolver $resolver)
2015-03-28 13:27:45 +00:00
{
$resolver->setDefaults([
2022-09-01 18:54:56 +00:00
'data_class' => Config::class,
]);
2015-03-28 13:27:45 +00:00
}
public function getBlockPrefix()
2015-03-28 13:27:45 +00:00
{
return 'feed_config';
2015-03-28 13:27:45 +00:00
}
}