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

  • ElementExtension
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 1: <?php
 2: 
 3: namespace Mapbender\CoreBundle\Extension;
 4: 
 5: /**
 6:  * ElementExtension
 7:  */
 8: class ElementExtension extends \Twig_Extension
 9: {
10:     
11:     /**
12:      * @inheritdoc
13:      */
14:     public function getName()
15:     {
16:         return 'mapbender_element';
17:     }
18: 
19:     /**
20:      * @inheritdoc
21:      */
22:     public function getFunctions()
23:     {
24:         return array(
25:             'element_class_title' => new \Twig_Function_Method($this, 'element_class_title'));
26:     }
27: 
28:     /**
29:      * 
30:      * @param type $element
31:      * @return type
32:      */
33:     public function element_class_title($element)
34:     {
35:         $class = $element->getClass();
36:         if(class_exists($class)) {
37:             return $class::getClassTitle();
38:         }
39:     }
40: }
41: 
42: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0