1: <?php
2:
3: namespace Mapbender\CoreBundle\Element;
4:
5: use Mapbender\CoreBundle\Component\Element;
6:
7: 8: 9: 10: 11: 12: 13:
14: class Copyright extends Element
15: {
16:
17: 18: 19:
20: public static function getClassTitle()
21: {
22: return "Copyright";
23: }
24:
25: 26: 27:
28: public static function getClassDescription()
29: {
30: return "The copyright shows a copyright label and terms of use as a dialog.";
31: }
32:
33: 34: 35:
36: public static function getClassTags()
37: {
38: return array('copyright', 'terms of use');
39: }
40:
41: 42: 43:
44: public static function getType()
45: {
46: return 'Mapbender\CoreBundle\Element\Type\CopyrightAdminType';
47: }
48:
49: 50: 51:
52: public function getAssets()
53: {
54: return array(
55: 'js' => array(
56: 'mapbender.element.copyright.js'
57: ),
58: 'css' => array()
59: );
60: }
61:
62: 63: 64:
65: public static function getDefaultConfiguration()
66: {
67:
68: return array(
69: 'tooltip' => 'Copyright',
70: "copyright_text" => "© Mapbender3, " . date("Y"),
71: "copyright_link" => "Terms of use",
72: "link_type" => "",
73: "link_url" => null,
74: "dialog_content" => "Terms of use (Content)",
75: "dialog_title" => "Terms of use",
76: 'width' => "200px",
77: 'anchor' => 'right-bottom');
78: }
79:
80: 81: 82:
83: public function getWidgetName()
84: {
85: return 'mapbender.mbCopyright';
86: }
87:
88: 89: 90:
91: public function render()
92: {
93: return $this->container->get('templating')
94: ->render('MapbenderCoreBundle:Element:copyright.html.twig',
95: array(
96: 'id' => $this->getId(),
97: 'title' => $this->getTitle(),
98: 'configuration' => $this->getConfiguration()));
99: }
100:
101: 102: 103:
104: public static function getFormTemplate()
105: {
106: return 'MapbenderManagerBundle:Element:copyright.html.twig';
107: }
108: }
109:
110: