77 $GLOBALS[
'LANG']->includeLLFile(
'EXT:lang/locallang_wizards.xlf');
88 protected function init() {
93 $origRow = BackendUtility::getRecord($this->P[
'table'], $this->P[
'uid']);
95 $this->table = $this->P[
'params'][
'table'];
99 if (substr($this->P[
'params'][
'pid'], 0, 3) ===
'###' && substr($this->P[
'params'][
'pid'], -3) ===
'###') {
100 $keyword = substr($this->P[
'params'][
'pid'], 3, -3);
101 if (strpos($keyword,
'PAGE_TSCONFIG_') === 0) {
102 $this->pid = (int)$TSconfig[$this->P[
'field']][$keyword];
104 $this->pid = (int)$TSconfig[
'_' . $keyword];
107 $this->pid = (int)$this->P[
'params'][
'pid'];
110 if ($this->pid ===
'') {
115 if ($this->returnEditConf) {
116 $eC = json_decode($this->returnEditConf, TRUE);
119 reset($eC[$this->table]);
120 $this->
id = (int)key($eC[$this->table]);
121 $cmd = current($eC[$this->table]);
123 if ($this->P[
'params'][
'setValue'] && $cmd ==
'edit' && $this->
id && $this->P[
'table'] && $this->P[
'field'] && $this->P[
'uid']) {
125 $this->
id = $LiveRec[
'uid'];
127 $this->processDataFlag = 1;
140 if ($this->returnEditConf) {
141 if ($this->processDataFlag) {
145 $trData->fetchRecord($this->P[
'table'], $this->P[
'uid'],
'');
146 $current = reset($trData->regTableItems_data);
148 if (is_array($current)) {
150 $tce->stripslashes_values = 0;
155 if ($this->P[
'flexFormPath']) {
159 $curValueOfFlexform = $flexToolObj->getArrayValueByPath($this->P[
'flexFormPath'], $currentFlexFormData);
161 switch ((
string) $this->P[
'params'][
'setValue']) {
163 $insertValue = $addEl;
166 $insertValue = $curValueOfFlexform .
',' . $addEl;
169 $insertValue = $addEl .
',' . $curValueOfFlexform;
173 $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']] = array();
174 $flexToolObj->setArrayValueByPath($this->P[
'flexFormPath'], $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']], $insertValue);
176 switch ((
string) $this->P[
'params'][
'setValue']) {
178 $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']] = $addEl;
181 $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']] = $current[$this->P[
'field']] .
',' . $addEl;
184 $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']] = $addEl .
',' . $current[$this->P[
'field']];
187 $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']] = implode(
',',
GeneralUtility::trimExplode(
',', $data[$this->P[
'table']][$this->P[
'uid']][$this->P[
'field']], TRUE));
190 $tce->start($data, array());
191 $tce->process_datamap();
199 $redirectUrl =
'alt_doc.php?returnUrl=' . rawurlencode(
GeneralUtility::getIndpEnv(
'REQUEST_URI')) .
'&returnEditConf=1&edit[' . $this->P[
'params'][
'table'] .
'][' . $this->pid .
']=new';
static getTCEFORM_TSconfig($table, $row)
static canBeInterpretedAsInteger($var)
static getIndpEnv($getEnvName)
static makeInstance($className)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static redirect($url, $httpStatus=self::HTTP_STATUS_303)
static sanitizeLocalUrl($url='')
static getLiveVersionOfRecord($table, $uid, $fields=' *')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static xml2array($string, $NSprefix='', $reportDocTag=FALSE)