1: <?php
2:
3: namespace Mapbender\CoreBundle\Element\Type;
4:
5: use Symfony\Component\Form\AbstractType;
6: use Symfony\Component\Form\FormBuilderInterface;
7: use Symfony\Component\OptionsResolver\OptionsResolverInterface;
8: use Mapbender\CoreBundle\Form\Type\PositionType;
9:
10: 11: 12:
13: class CopyrightAdminType extends AbstractType
14: {
15:
16: 17: 18:
19: public function getName()
20: {
21: return 'copyright';
22: }
23:
24: 25: 26:
27: public function setDefaultOptions(OptionsResolverInterface $resolver)
28: {
29: $resolver->setDefaults(array(
30: 'application' => null,
31: ));
32: }
33:
34: 35: 36:
37: public function buildForm(FormBuilderInterface $builder, array $options)
38: {
39: $builder->add('tooltip', 'text', array('required' => false))
40: ->add('width', 'text', array('required' => true))
41: ->add('anchor', "choice",
42: array(
43: 'required' => true,
44: "choices" => array(
45: 'left-top' => 'left-top',
46: 'left-bottom' => 'left-bottom',
47: 'right-top' => 'right-top',
48: 'right-bottom' => 'right-bottom')))
49: ->add('copyright_text', 'text', array('required' => false))
50: ->add('copyright_link', 'text', array('required' => false))
51: ->add('link_type', 'choice', array(
52: 'choices' => array('' => ' ','dialog' => 'dialog', 'url' => 'url'),
53: 'required' => false))
54: ->add('link_url', 'text', array('required' => false))
55: ->add('dialog_content', 'textarea', array('required' => false))
56: ->add('dialog_title', 'text', array('required' => false));
57: }
58:
59: }