1: <?php
2:
3: namespace Mapbender\CoreBundle\Element;
4:
5: use Mapbender\CoreBundle\Component\Element;
6:
7: /**
8: * Map's overview element
9: *
10: * @author Paul Schmidt
11: */
12: class ScaleDisplay extends Element
13: {
14:
15: /**
16: * @inheritdoc
17: */
18: static public function getClassTitle()
19: {
20: return "ScaleDisplay";
21: }
22:
23: /**
24: * @inheritdoc
25: */
26: static public function getClassDescription()
27: {
28: return "";
29: }
30:
31: /**
32: * @inheritdoc
33: */
34: static public function getClassTags()
35: {
36: return array('ScaleDisplay', "Map's scale display");
37: }
38:
39: /**
40: * @inheritdoc
41: */
42: public static function getDefaultConfiguration()
43: {
44: return array(
45: 'title' => 'Scale Display',
46: 'tooltip' => 'Scale Display',
47: 'target' => null,
48: 'unitPrefix' => false,
49: 'anchor' => 'right-bottom');
50: }
51:
52: /**
53: * @inheritdoc
54: */
55: public function getWidgetName()
56: {
57: return 'mapbender.mbScaledisplay';
58: }
59:
60: /**
61: * @inheritdoc
62: */
63: public static function getType()
64: {
65: return 'Mapbender\CoreBundle\Element\Type\ScaleDisplayAdminType';
66: }
67:
68: /**
69: * @inheritdoc
70: */
71: public static function getFormTemplate()
72: {
73: return 'MapbenderManagerBundle:Element:scaledisplay.html.twig';
74: }
75:
76: /**
77: * @inheritdoc
78: */
79: public function getAssets()
80: {
81: return array(
82: 'js' => array('mapbender.element.scaledisplay.js'),
83: 'css' => array());
84: }
85:
86: /**
87: * @inheritdoc
88: */
89: public function render()
90: {
91: return $this->container->get('templating')
92: ->render('MapbenderCoreBundle:Element:scaledisplay.html.twig',
93: array(
94: 'id' => $this->getId(),
95: "title" => $this->getTitle(),
96: 'configuration' => $this->getConfiguration()));
97: }
98:
99: }
100:
101: