1: <?php
2:
3: namespace Mapbender\CoreBundle\Element;
4:
5: use Mapbender\CoreBundle\Component\Element;
6: use Symfony\Component\HttpFoundation\Response;
7: use Symfony\Component\Security\Core\User\UserInterface;
8:
9: 10: 11: 12: 13: 14: 15:
16: class FeatureInfo extends Element
17: {
18:
19: 20: 21:
22: static public function getClassTitle()
23: {
24: return "Feature Info Dialog";
25: }
26:
27: 28: 29:
30: static public function getClassDescription()
31: {
32: return "Feature info tool for most layer types";
33: }
34:
35: 36: 37:
38: static public function getClassTags()
39: {
40: return array('dialog', 'featureinfo');
41: }
42:
43: 44: 45:
46: public static function getDefaultConfiguration()
47: {
48: return array(
49: 'tooltip' => 'Feature Info Dialog',
50: "autoOpen" => false,
51: "deactivateOnClose" => true,
52: "target" => null);
53: }
54:
55: 56: 57:
58: public function getWidgetName()
59: {
60: return 'mapbender.mbFeatureInfo';
61: }
62:
63: 64: 65:
66: public static function getType()
67: {
68: return 'Mapbender\CoreBundle\Element\Type\FeatureInfoAdminType';
69: }
70:
71: 72: 73:
74: public function getAssets()
75: {
76: return array(
77: 'js' => array('mapbender.element.featureInfo.js',
78: '@FOMCoreBundle/Resources/public/js/widgets/popup.js',
79: '@FOMCoreBundle/Resources/public/js/frontend/components.js'
80: ),'css' => array()
81: );
82: }
83:
84: 85: 86:
87: public function render()
88: {
89: $configuration = parent::getConfiguration();
90: return $this->container->get('templating')
91: ->render('MapbenderCoreBundle:Element:featureinfo.html.twig',
92: array(
93: 'id' => $this->getId(),
94: 'configuration' => $configuration,
95: 'title' => $this->getTitle()));
96: }
97:
98: 99: 100:
101: public static function getFormTemplate()
102: {
103: return 'MapbenderManagerBundle:Element:featureinfo.html.twig';
104: }
105: }
106:
107: