Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • DrupalIntegrationBundle
      • DependencyInjection
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Factory
        • Firewall
        • User
      • Session
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • EventListener
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • AboutDialogAdminType
  • ActivityIndicatorAdminType
  • ButtonAdminType
  • CoordinatesDisplayAdminType
  • CopyrightAdminType
  • FeatureInfoAdminType
  • GpsPositionAdminType
  • LayertreeAdminType
  • LegendAdminType
  • MapAdminType
  • OverviewAdminType
  • PrintClientAdminType
  • PrintClientQualityAdminType
  • PrintClientTemplateAdminType
  • RulerAdminType
  • ScaleBarAdminType
  • ScaleDisplayAdminType
  • ScaleSelectorAdminType
  • SearchRouterFormType
  • SearchRouterSelectType
  • SrsSelectorAdminType
  • TargetElementType
  • ZoomBarAdminType
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 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: 
 9: /**
10:  * 
11:  */
12: class LegendAdminType extends AbstractType
13: {
14: 
15:     /**
16:      * @inheritdoc
17:      */
18:     public function getName()
19:     {
20:         return 'legend';
21:     }
22: 
23:     /**
24:      * @inheritdoc
25:      */
26:     public function setDefaultOptions(OptionsResolverInterface $resolver)
27:     {
28:         $resolver->setDefaults(array(
29:             'application' => null
30:         ));
31:     }
32: 
33:     /**
34:      * @inheritdoc
35:      */
36:     public function buildForm(FormBuilderInterface $builder, array $options)
37:     {
38:         $builder->add('tooltip', 'text', array('required' => false))
39:                 ->add('elementType', 'choice',
40:                       array(
41:                     'required' => true,
42:                     'choices' => array(
43:                         "dialog" => "dialog",
44:                         "blockelement" => "blockelement")))
45:                 ->add('autoOpen', 'checkbox', array('required' => false))
46:                 ->add('displayType', 'choice',
47:                       array(
48:                     'required' => true,
49:                     'choices' => array(
50:                         "list" => "list"
51:                         // WATCHOUT:
52:                         // Accordion is not supported in v.3.0.0.0.
53:                         // Support comes in the next versions
54:                         // "accordion" => "accordion"
55:                         )))
56:                 ->add('target', 'target_element',
57:                       array(
58:                     'element_class' => 'Mapbender\\CoreBundle\\Element\\Map',
59:                     'application' => $options['application'],
60:                     'property_path' => '[target]',
61:                     'required' => false))
62:                 ->add('checkGraphic', 'checkbox', array('required' => false))
63:                 ->add('hideEmptyLayers', 'checkbox', array('required' => false))
64:                 
65:                 ->add('noLegend', 'text', array('required' => false))
66:                 ->add('generateLegendGraphicUrl', 'checkbox',
67:                       array('required' => false))
68:                 ->add('showSourceTitle', 'checkbox', array('required' => false))
69:                 ->add('showLayerTitle', 'checkbox', array('required' => false))
70:                 ->add('showGrouppedTitle', 'checkbox',
71:                       array('required' => false))
72:         ;
73:     }
74: 
75: }
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0