Working Copy
[TYPO3CMS/Extensions/powermailCond.git] / oldLib / class.tx_powermailcond_pidContainer.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2011 Alexander Kellner <alexander.kellner@in2code.de>, in2code.
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25 /**
26 * This class adds a pid container hidden field at the end of a powermail form
27 *
28 * @author Alex Kellner <alexander.kellner@in2code.de>, in2code.
29 * @package TYPO3
30 * @subpackage tx_powermailcond_pidContainer
31 */
32 class tx_powermailcond_pidContainer {
33
34 public $extKey = 'powermail_cond'; // Extension key
35 public $prefixId = 'tx_powermailcond_pi1';
36
37 /**
38 * Return all values from the session (could be used for debugging, etc..)
39 *
40 * @param array Outer Marker Array
41 * @param array Subpart Array
42 * @param array TypoScript configuration
43 * @param object Parent object
44 * @return void
45 */
46 public function PM_FormWrapMarkerHook($markerArray, &$subpartArray, $conf, $pObj) {
47 if (isset($subpartArray['###POWERMAIL_CONTENT###'])) {
48 $subpartArray['###POWERMAIL_CONTENT###'] .= '<input type="hidden" id="powermail_cond_pid_container" name="powermail_cond_pid_container" value="' . intval($GLOBALS['TSFE']->id) . '" />';
49 }
50 }
51
52 }
53
54 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/powermail_cond/lib/class.tx_powermailcond_div.php']) {
55 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/powermail_cond/lib/class.tx_powermailcond_div.php']);
56 }
57 ?>