Redaxscript\Modules\DirectoryLister\DirectoryLister::_replace PHP Method

_replace() protected static method

replace
protected static _replace ( string $text, string $fileExtension, array $replaceArray ) : string
$text string
$fileExtension string
$replaceArray array
return string
    protected static function _replace($text, $fileExtension, $replaceArray)
    {
        foreach ($replaceArray as $replaceKey => $replaceValue) {
            if ($replaceKey === self::$_configArray['replaceKey']['extension']) {
                $replaceKey = $fileExtension;
            }
            $text = str_replace($replaceKey, $replaceValue, $text);
        }
        return $text;
    }