コード例 #1
0
    /**
     * Compiles the ext_emconf.php file
     *
     * @param	string		Extension key
     * @param	array		EM_CONF array
     * @return	string		PHP file content, ready to write to ext_emconf.php file
     */
    function construct_ext_emconf_file($extKey, $EM_CONF)
    {
        // clean version number:
        $vDat = tx_em_Tools::renderVersion($EM_CONF['version']);
        $EM_CONF['version'] = $vDat['version'];
        $code = '<?php

########################################################################
# Extension Manager/Repository config file for ext "' . $extKey . '".
#
# Auto generated ' . date('d-m-Y H:i') . '
#
# Manual updates:
# Only the data in the array - everything else is removed by next
# writing. "version" and "dependencies" must not be touched!
########################################################################

$EM_CONF[$_EXTKEY] = ' . tx_em_Tools::arrayToCode($EM_CONF, 0) . ';

?>';
        return str_replace(CR, '', $code);
    }