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 RulerAdminType extends AbstractType
13: {
14:     /**
15:      * @inheritdoc
16:      */
17:     public function getName() {
18:         return 'ruler';
19:     }
20:     /**
21:      * @inheritdoc
22:      */
23:     public function setDefaultOptions(OptionsResolverInterface $resolver)
24:     {
25:         $resolver->setDefaults(array(
26:             'application' => null
27:             ));
28:     }
29:     /**
30:      * @inheritdoc
31:      */
32:     public function buildForm(FormBuilderInterface $builder, array $options)
33:     {
34:         $builder->add('tooltip', 'text', array('required' => false))
35:                 ->add('target', 'target_element', array(
36:                     'element_class' => 'Mapbender\\CoreBundle\\Element\\Map',
37:                     'application' => $options['application'],
38:                     'property_path' => '[target]',
39:                     'required' => false))
40:                 ->add('type', 'choice', array(
41:                     'required' => true,
42:                     'choices' => array("line" => "line", "area" => "area")));
43:     }
44: }
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0