public function exportThemeHook($xml, $zipArchive, $themeId)
	{
		$xpath = new \DOMXPath($xml);
		$tlModule = $xpath->query('/tables/table[@name = \'tl_module\']')->item(0);

		if (!$tlModule) {
			return;
		}

		static::reloadConfig();

		foreach ($tlModule->childNodes as $row) {

			if (strtolower($row->nodeName) !== 'row') {
				continue;
			}

			$type = $xpath->query('field[@name = \'type\']', $row)->item(0);
			if (!$type || substr($type->nodeValue, 0, 5) !== 'rsce_') {
				continue;
			}

			$rsceData = $xpath->query('field[@name = \'rsce_data\']', $row)->item(0);
			if (!$rsceData) {
				continue;
			}

			$rsceDataConverted = $this->convertDataForImportExport(
				false,
				$type->nodeValue,
				$rsceData->nodeValue
			);

			if (
				!$rsceDataConverted
				|| strtolower($rsceDataConverted) === 'null'
				|| $rsceDataConverted === '{}'
				|| $rsceDataConverted === '[]'
				|| $rsceDataConverted === $rsceData->nodeValue
			) {
				continue;
			}

			$rsceData->nodeValue = $rsceDataConverted;

		}
	}
public function exportThemeHook($xml, $zipArchive, $themeId)
	{
		$xpath = new \DOMXPath($xml);
		$tlModule = $xpath->query('/tables/table[@name = \'tl_module\']')->item(0);

		if (!$tlModule) {
			return;
		}

		static::reloadConfig();

		foreach ($tlModule->childNodes as $row) {

			if (strtolower($row->nodeName) !== 'row') {
				continue;
			}

			$type = $xpath->query('field[@name = \'type\']', $row)->item(0);
			if (!$type || substr($type->nodeValue, 0, 5) !== 'rsce_') {
				continue;
			}

			$rsceData = $xpath->query('field[@name = \'rsce_data\']', $row)->item(0);
			if (!$rsceData) {
				continue;
			}

			$rsceDataConverted = $this->convertDataForImportExport(
				false,
				$type->nodeValue,
				$rsceData->nodeValue
			);

			if (
				!$rsceDataConverted
				|| strtolower($rsceDataConverted) === 'null'
				|| $rsceDataConverted === '{}'
				|| $rsceDataConverted === '[]'
				|| $rsceDataConverted === $rsceData->nodeValue
			) {
				continue;
			}

			$rsceData->nodeValue = $rsceDataConverted;

		}
	}
public function exportThemeHook ( $ xml , $ zipArchive , $ themeId ) { $ xpath = new \ DOMXPath ( $ xml ) ; $ tlModule = $ xpath -> query ( '/tables/table[@name = \'tl_module\']' ) -> item ( 0 ) ; if ( ! $ tlModule ) { return ; } static :: reloadConfig ( ) ; foreach ( $ tlModule -> childNodes as $ row ) { if ( strtolower ( $ row -> nodeName ) !== 'row' ) { continue ; } $ type = $ xpath -> query ( 'field[@name = \'type\']' , $ row ) -> item ( 0 ) ; if ( ! $ type || substr ( $ type -> nodeValue , 0 , 5 ) !== 'rsce_' ) { continue ; } $ rsceData = $ xpath -> query ( 'field[@name = \'rsce_data\']' , $ row ) -> item ( 0 ) ; if ( ! $ rsceData ) { continue ; } $ rsceDataConverted = $ this -> convertDataForImportExport ( false , $ type -> nodeValue , $ rsceData -> nodeValue ) ; if ( ! $ rsceDataConverted || strtolower ( $ rsceDataConverted ) === 'null' || $ rsceDataConverted === '{}' || $ rsceDataConverted === '[]' || $ rsceDataConverted === $ rsceData -> nodeValue ) { continue ; } $ rsceData -> nodeValue = $ rsceDataConverted ; } }
Convert IDs for theme export

@param  \DOMDocument $xml        theme.xml
@param  \ZipWriter   $zipArchive CTO file
@param  int          $themeId
@return void
Convert IDs for theme export