1: <?php
2:
3: namespace Mapbender\CoreBundle\Element;
4:
5: use Mapbender\CoreBundle\Component\Element;
6:
7: 8: 9:
10: class GpsPosition extends Element
11: {
12:
13: 14: 15:
16: static public function getClassTitle()
17: {
18: return "GPS-Position";
19: }
20:
21: 22: 23:
24: static public function getClassDescription()
25: {
26: return "Renders a button to show the GPS-Position";
27: }
28:
29: 30: 31:
32: static public function getClassTags()
33: {
34: return array('GPS','Position');
35: }
36:
37: 38: 39:
40: public function getAssets()
41: {
42: return array(
43: 'js' => array(
44: 'mapbender.element.button.js',
45: 'mapbender.element.gpsPosition.js'),
46: 'css' => array());
47: }
48:
49: 50: 51:
52: public static function getType()
53: {
54: return 'Mapbender\CoreBundle\Element\Type\GpsPositionAdminType';
55: }
56:
57: 58: 59:
60: public static function getDefaultConfiguration()
61: {
62: return array(
63: 'tooltip' => "GPS-Position",
64: 'label' => true,
65: 'autoStart' => false,
66: 'target' => null,
67: 'icon' => null,
68: 'refreshinterval' => '5000');
69: }
70:
71: 72: 73:
74: public function getWidgetName()
75: {
76: return 'mapbender.mbGpsPosition';
77: }
78:
79: 80: 81:
82: public function render()
83: {
84: $configuration = $this->getConfiguration();
85: return $this->container->get('templating')
86: ->render('MapbenderCoreBundle:Element:gpsposition.html.twig',
87: array(
88: 'id' => $this->getId(),
89: 'configuration' => $configuration,
90: 'title' => $this->getTitle()));
91: }
92:
93: 94: 95:
96: public static function getFormTemplate()
97: {
98: return 'MapbenderManagerBundle:Element:gpsposition.html.twig';
99: }
100: }
101:
102: