1: <?php
2:
3: namespace Mapbender\CoreBundle\Element;
4:
5: use Mapbender\CoreBundle\Component\Element;
6:
7: 8: 9: 10: 11: 12: 13: 14: 15:
16: class ZoomBar extends Element
17: {
18:
19: 20: 21:
22: public static function getClassTitle()
23: {
24: return "Navigation Toolbar";
25: }
26:
27: 28: 29:
30: public static function getClassDescription()
31: {
32: return "The Navigation Toolbar element provides a floating control to pan and zoom,
33: similar to the OpenLayers PanZoomBar control. This element though is easier to
34: use when custom styling is needed.";
35: }
36:
37: 38: 39:
40: public static function getClassTags()
41: {
42: return array('zoom', 'pan', 'control', 'navigation', 'panel');
43: }
44:
45: 46: 47:
48: public function getAssets()
49: {
50: return array('js' => array('mapbender.element.zoombar.js'),'css' => array());
51: }
52:
53: 54: 55:
56: public static function getDefaultConfiguration()
57: {
58: return array(
59: 'tooltip' => null,
60: 'target_map' => null,
61: 'components' => array(
62: "pan" => "pan",
63: "history" => "history",
64: "zoom_box" => "zoom box",
65: "zoom_max" => "zoom to max extent",
66: "zoom_slider" => "zoom slider"),
67: 'anchor' => 'left-top',
68: 'stepSize' => 50,
69: 'stepByPixel' => false,
70: 'draggable' => true);
71: }
72:
73: 74: 75:
76: public function getWidgetName()
77: {
78: return 'mapbender.mbZoomBar';
79: }
80:
81: 82: 83:
84: public function render()
85: {
86: return $this->container->get('templating')
87: ->render('MapbenderCoreBundle:Element:zoombar.html.twig',
88: array(
89: 'id' => $this->getId(),
90: "title" => $this->getTitle(),
91: 'configuration' => $this->getConfiguration()));
92: }
93:
94: 95: 96:
97: public static function getType()
98: {
99: return 'Mapbender\CoreBundle\Element\Type\ZoomBarAdminType';
100: }
101:
102: 103: 104:
105: public static function getFormTemplate()
106: {
107: return 'MapbenderManagerBundle:Element:zoombar.html.twig';
108: }
109: }
110:
111: