1: <?php
2:
3: namespace Mapbender\WmsBundle\Element;
4:
5: use Mapbender\CoreBundle\Component\Element;
6:
7: 8: 9: 10: 11: 12:
13: class WmsLoader extends Element
14: {
15:
16: 17: 18:
19: static public function getClassTitle()
20: {
21: return "WmsLoader";
22: }
23:
24: 25: 26:
27: static public function getClassDescription()
28: {
29: return "";
30: }
31:
32: 33: 34:
35: static public function getClassTags()
36: {
37: return array("wms", "loader");
38: }
39:
40: 41: 42:
43: public static function getDefaultConfiguration()
44: {
45: return array(
46: "tooltip" => "",
47: "target" => null,
48: "autoOpen" => false,
49: "defaultFormat" => "image/png",
50: "defaultInfoFormat" => "text/html",
51: "splitLayers" => false
52: );
53: }
54:
55: 56: 57:
58: public function getWidgetName()
59: {
60: return 'mapbender.mbWmsloader';
61: }
62:
63: 64: 65:
66: public function getAssets()
67: {
68: return array('js' => array(
69: '@FOMCoreBundle/Resources/public/js/widgets/popup.js',
70: 'mapbender.element.wmsloader.js'
71: ),'css' => array());
72: }
73:
74: 75: 76:
77: public static function getType()
78: {
79: return 'Mapbender\WmsBundle\Element\Type\WmsLoaderAdminType';
80: }
81:
82: 83: 84:
85: public static function getFormTemplate()
86: {
87: return 'MapbenderManagerBundle:Element:wms_loader.html.twig';
88: }
89:
90: 91: 92:
93: public function render()
94: {
95: return $this->container->get('templating')
96: ->render('MapbenderWmsBundle:Element:wmsloader.html.twig',
97: array(
98: 'id' => $this->getId(),
99: "title" => $this->getTitle(),
100: 'configuration' => $this->getConfiguration()));
101: }
102:
103: }
104:
105: