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

  • AboutDialog
  • ActivityIndicator
  • Button
  • CoordinatesDisplay
  • Copyright
  • FeatureInfo
  • GpsPosition
  • Layertree
  • Legend
  • Map
  • Overview
  • PrintClient
  • Ruler
  • ScaleBar
  • ScaleDisplay
  • ScaleSelector
  • SearchRouter
  • SrsSelector
  • ZoomBar
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: 
  3: namespace Mapbender\CoreBundle\Element;
  4: 
  5: use Mapbender\CoreBundle\Component\Element;
  6: 
  7: /**
  8:  * The Legend class shows legends of the map's layers.
  9:  * 
 10:  * @author Paul Schmidt
 11:  */
 12: class Legend extends Element
 13: {
 14: 
 15:     /**
 16:      * @inheritdoc
 17:      */
 18:     public static function getClassTitle()
 19:     {
 20:         return "Legend Object";
 21:     }
 22: 
 23:     /**
 24:      * @inheritdoc
 25:      */
 26:     public static function getClassDescription()
 27:     {
 28:         return "The legend object shows the legend of the map's layers.";
 29:     }
 30: 
 31:     /**
 32:      * @inheritdoc
 33:      */
 34:     public static function getClassTags()
 35:     {
 36:         return array('legend', "dialog");
 37:     }
 38: 
 39:     /**
 40:      * @inheritdoc
 41:      */
 42:     public function getAssets()
 43:     {
 44:         return array(
 45:             'js' => array(
 46:                 'mapbender.element.legend.js',
 47:                 '@FOMCoreBundle/Resources/public/js/widgets/popup.js'
 48:             ), 'css' => array()
 49:         );
 50:     }
 51: 
 52:     /**
 53:      * @inheritdoc
 54:      */
 55:     public static function getDefaultConfiguration()
 56:     {
 57:         return array(
 58:             "target" => null,
 59:             "elementType" => null,
 60:             "displayType" => null,
 61:             "noLegend" => "No legend available",
 62:             "autoOpen" => true,
 63:             "tooltip" => "Legend",
 64:             "checkGraphic" => false,
 65:             "hideEmptyLayers" => true,
 66:             "generateLegendGraphicUrl" => false,
 67:             "showSourceTitle" => true,
 68:             "showLayerTitle" => true,
 69:             "showGrouppedTitle" => true);
 70:     }
 71: 
 72:     /**
 73:      * @inheritdoc
 74:      */
 75:     public static function getType()
 76:     {
 77:         return 'Mapbender\CoreBundle\Element\Type\LegendAdminType';
 78:     }
 79: 
 80:     /**
 81:      * @inheritdoc
 82:      */
 83:     public function getWidgetName()
 84:     {
 85:         return 'mapbender.mbLegend';
 86:     }
 87: 
 88:     /**
 89:      * @inheritdoc
 90:      */
 91:     public function render()
 92:     {
 93:         return $this->container->get('templating')->render(
 94:                         'MapbenderCoreBundle:Element:legend.html.twig',
 95:                         array('id' => $this->getId(),
 96:                             "title" => $this->getTitle(),
 97:                             'configuration' => $this->getConfiguration()));
 98:     }
 99: 
100:     /**
101:      * @inheritdoc
102:      */
103:     public static function getFormTemplate()
104:     {
105:         return 'MapbenderManagerBundle:Element:legend.html.twig';
106:     }
107: }
108: 
109: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0