1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,57 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * eSales Media oxVoucher for Contao Open Source CMS |
|
5 |
+ * |
|
6 |
+ * Copyright (c) 2015 eSales Media |
|
7 |
+ * |
|
8 |
+ * @author Benjamin Roth [benjamin@esales-media.de] |
|
9 |
+ * @license proprietary |
|
10 |
+ */ |
|
11 |
+ |
|
12 |
+namespace eSM_oxVoucher; |
|
13 |
+ |
|
14 |
+class ModuleVoucherSearch extends ModuleVoucher |
|
15 |
+{ |
|
16 |
+ /** |
|
17 |
+ * Template |
|
18 |
+ * @var string |
|
19 |
+ */ |
|
20 |
+ protected $strTemplate = 'mod_oxvoucher_search'; |
|
21 |
+ |
|
22 |
+ /** |
|
23 |
+ * Parse the template |
|
24 |
+ * @return string |
|
25 |
+ */ |
|
26 |
+ public function generate() |
|
27 |
+ { |
|
28 |
+ if (TL_MODE == 'BE') |
|
29 |
+ { |
|
30 |
+ /** @var \BackendTemplate|object $objTemplate */ |
|
31 |
+ $objTemplate = new \BackendTemplate('be_wildcard'); |
|
32 |
+ |
|
33 |
+ $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['oxvoucher_search'][0]) . ' ###'; |
|
34 |
+ $objTemplate->title = $this->headline; |
|
35 |
+ $objTemplate->id = $this->id; |
|
36 |
+ $objTemplate->link = $this->name; |
|
37 |
+ $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id; |
|
38 |
+ |
|
39 |
+ return $objTemplate->parse(); |
|
40 |
+ } |
|
41 |
+ |
|
42 |
+ $this->importOxDbInstance(); |
|
43 |
+ |
|
44 |
+ return parent::generate(); |
|
45 |
+ } |
|
46 |
+ |
|
47 |
+ |
|
48 |
+ /** |
|
49 |
+ * Compile the current element |
|
50 |
+ */ |
|
51 |
+ protected function compile() |
|
52 |
+ { |
|
53 |
+ $this->Template->searchLabel = $GLOBALS['TL_LANG']['MSC']['oxVoucher']['searchLabel']; |
|
54 |
+ $this->Template->submitLabel = $GLOBALS['TL_LANG']['MSC']['oxVoucher']['searchSubmitLabel']; |
|
55 |
+ } |
|
56 |
+ |
|
57 |
+} |
|
0 | 58 |
\ No newline at end of file |