Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • 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
        • 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
  • RulerAdminType
  • ScaleBarAdminType
  • 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 LayertreeAdminType extends AbstractType
13: {
14: 
15:     /**
16:      * @inheritdoc
17:      */
18:     public function getName()
19:     {
20:         return 'layertree';
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('target', 'target_element',
39:                       array(
40:                     'element_class' => 'Mapbender\\CoreBundle\\Element\\Map',
41:                     'application' => $options['application'],
42:                     'property_path' => '[target]',
43:                     'required' => false))
44:                 ->add('layerMenu', 'checkbox',
45:                           array(
46:                         'required' => false))
47:                 ->add('layerRemove', 'checkbox',
48:                           array(
49:                         'required' => false))
50:                 ->add('type', 'choice',
51:                       array(
52:                     'required' => true,
53:                     'choices' => array('dialog' => 'Dialog', 'element' => 'Element')))
54:                 ->add('autoOpen', 'checkbox',
55:                       array(
56:                     'required' => false))
57:                 ->add('displaytype', 'choice',
58:                       array(
59:                     'required' => true,
60:                     'choices' => array('tree' => 'Tree')
61:                       // WATCHOUT:
62:                       // List is not supported in v.3.0.0.0.
63:                       // Support comes in the next versions
64:                       // 'list' => 'List'
65:                     ))
66:                 // WATCHOUT:
67:                 // Accordion is not supported in v.3.0.0.0.
68:                 // ->add('useAccordion', 'checkbox',
69:                 //       array(
70:                 //     'required' => false))
71:                 ->add('titlemaxlength', 'text',
72:                       array('required' => true))
73:                 ->add('showBaseSource', 'checkbox',
74:                           array(
75:                         'required' => false))
76:                 ->add('showHeader', 'checkbox',
77:                           array(
78:                         'required' => false));
79:     }
80: 
81: }
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0