| Conditions | 7 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function render() |
||
| 27 | { |
||
| 28 | $pid = (int)GeneralUtility::_GET('id'); |
||
| 29 | |||
| 30 | if ($pid === 0) { |
||
| 31 | $tsConfig = BackendUtility::getPagesTSconfig(0); |
||
| 32 | if (isset($tsConfig['tx_sfeventmgt.']['module.']) && is_array($tsConfig['tx_sfeventmgt.']['module.'])) { |
||
| 33 | $tsConfiguration = $tsConfig['tx_sfeventmgt.']['module.']; |
||
| 34 | if (isset($tsConfiguration['defaultPid.']) |
||
| 35 | && is_array($tsConfiguration['defaultPid.']) |
||
| 36 | && isset($tsConfiguration['defaultPid.']['tx_sfeventmgt_domain_model_event']) |
||
| 37 | ) { |
||
| 38 | $pid = (int)$tsConfiguration['defaultPid.']['tx_sfeventmgt_domain_model_event']; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | $parameters = [ |
||
| 44 | 'edit[tx_sfeventmgt_domain_model_event][' . $pid . ']' => 'new', |
||
| 45 | ]; |
||
| 46 | $parameters['returnUrl'] = 'index.php?M=web_SfEventMgtTxSfeventmgtM1&id=' . $pid . $this->getModuleToken(); |
||
| 47 | |||
| 48 | return BackendUtility::getModuleUrl('record_edit', $parameters); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |