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 Mapbender\CoreBundle\Form\Type\PositionType;
 8: use Symfony\Component\OptionsResolver\OptionsResolverInterface;
 9: use Mapbender\CoreBundle\Form\Type\ExtentType;
10: use Mapbender\CoreBundle\Entity\Layerset;
11: use Mapbender\CoreBundle\Element\DataTranformer\LayersetNameTranformer;
12: 
13: /**
14:  * 
15:  */
16: class OverviewAdminType extends AbstractType
17: {
18: 
19:     /**
20:      * @inheritdoc
21:      */
22:     public function getName()
23:     {
24:         return 'overview';
25:     }
26: 
27:     /**
28:      * @inheritdoc
29:      */
30:     public function setDefaultOptions(OptionsResolverInterface $resolver)
31:     {
32:         $resolver->setDefaults(array(
33:             'application' => null
34:         ));
35:     }
36: 
37:     /**
38:      * @inheritdoc
39:      */
40:     public function buildForm(FormBuilderInterface $builder, array $options)
41:     {
42:         $app = $options['application'];
43:         $layersets = array();
44:         foreach($app->getLayersets() as $layerset)
45:         {
46:             $layersets[$layerset->getId()] = $layerset->getTitle();
47:         }
48: 
49:         $builder->add('tooltip', 'text', array('required' => false))
50:                 ->add('layerset', 'choice',
51:                       array(
52:                     'label' => 'Layerset',
53:                     "required" => true,
54:                     'choices' => $layersets))
55:                 ->add('target', 'target_element',
56:                       array(
57:                     'element_class' => 'Mapbender\\CoreBundle\\Element\\Map',
58:                     'application' => $options['application'],
59:                     'property_path' => '[target]',
60:                     'required' => false))
61:                 ->add('anchor', "choice",
62:                       array(
63:                     'required' => true,
64:                     "choices" => array(
65:                         'left-top' => 'left-top',
66:                         'left-bottom' => 'left-bottom',
67:                         'right-top' => 'right-top',
68:                         'right-bottom' => 'right-bottom')))
69:                 ->add('maximized', 'checkbox', array('required' => false))
70:                 ->add('fixed', 'checkbox', array('required' => false))
71:                 ->add('width', 'text', array('required' => true))
72:                 ->add('height', 'text', array('required' => true));
73:     }
74: 
75: }
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0