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

  • ApplicationType
  • YAMLConfigurationType
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 1: <?php
 2: 
 3: namespace Mapbender\ManagerBundle\Form\Type;
 4: 
 5: use Symfony\Component\Form\AbstractType;
 6: use Symfony\Component\Form\FormBuilderInterface;
 7: use Symfony\Component\OptionsResolver\OptionsResolverInterface;
 8: 
 9: use Mapbender\ManagerBundle\Form\Type\BaseElementType;
10: 
11: class ApplicationType extends AbstractType {
12:     public function getName() {
13:         return 'application';
14:     }
15: 
16:     public function setDefaultOptions(OptionsResolverInterface $resolver)
17:     {
18:         $resolver->setDefaults(array(
19:             'available_templates' => array()));
20:     }
21: 
22:     public function buildForm(FormBuilderInterface $builder, array $options) {
23:         $builder
24:             // Base data
25:             ->add('title', 'text', array(
26:                 'attr' => array(
27:                     'title' => 'The application title, as shown in the browser '
28:                         . 'title bar and in lists.')))
29:             ->add('slug', 'text', array(
30:                 'label' => 'URL title',
31:                 'attr' => array(
32:                     'title' => 'The URL title (slug) is based on the title and used in the '
33:                         . 'application URL.')))
34:             ->add('description', 'textarea', array(
35:                 'required' => false,
36:                 'attr' => array(
37:                     'title' => 'The description is used in overview lists.')))
38:             ->add('template', 'choice', array(
39:                 'choices' => $options['available_templates'],
40:                 'attr' => array(
41:                     'title' => 'The HTML template used for this '
42:                     .'application.')))
43: 
44:             // Security
45:             ->add('published', 'checkbox', array(
46:                 'required' => false,
47:                 'label' => 'Published'));
48: 
49:             $builder->add('acl', 'acl', array(
50:                 'property_path' => false,
51:                 'data' => $options['data'],
52:                 'permissions' => 'standard::object'));
53:     }
54: }
55: 
56: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0