/** * Constructs emConf and writes it to corresponding file * In case the file has been extracted already, the properties of the meta data take precedence but are merged with the present ext_emconf.php * * @param array $extensionData * @param string $rootPath * @param Extension $extension * @return void */ protected function writeEmConfToFile(array $extensionData, $rootPath, Extension $extension = null) { $emConfFileData = array(); if (file_exists($rootPath . 'ext_emconf.php')) { $emConfFileData = $this->emConfUtility->includeEmConf(array('key' => $extensionData['extKey'], 'siteRelPath' => PathUtility::stripPathSitePrefix($rootPath))); } $extensionData['EM_CONF'] = array_replace_recursive($emConfFileData, $extensionData['EM_CONF']); $emConfContent = $this->emConfUtility->constructEmConf($extensionData, $extension); GeneralUtility::writeFile($rootPath . 'ext_emconf.php', $emConfContent); }
/** * Constructs emConf and writes it to corresponding file * * @param array $extensionData * @param string $rootPath * @param \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension * @return void */ protected function writeEmConfToFile(array $extensionData, $rootPath, \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension = NULL) { $emConfContent = $this->emConfUtility->constructEmConf($extensionData, $extension); GeneralUtility::writeFile($rootPath . 'ext_emconf.php', $emConfContent); }