Skip to content

Conversation

vrana
Copy link
Contributor

@vrana vrana commented Sep 26, 2025

This is an example config:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
	<component name="LattePluginSettings">
		<customMacroSettings>
			<list>
				<LatteTagSettings MacroName="normal" />
				<LatteTagSettings MacroType="ATTR_ONLY" MacroName="attrOnly" />
				<LatteTagSettings MacroName="pair" />
			</list>
		</customMacroSettings>
		<customModifierSettings>
			<list>
				<LatteFilterSettings ModifierName="myFilter" ModifierHelp="param" />
			</list>
		</customModifierSettings>
		<customFunctionSettings>
			<list>
				<LatteFunctionSettings FunctionReturnType="bool" FunctionName="myFunction" FunctionHelp="(param)" />
			</list>
		</customFunctionSettings>
	</component>
</project>

Please let me know if it can be improved.

@rixafy
Copy link
Owner

rixafy commented Oct 2, 2025

Thank you for contributing, I'll look at it during this or next weekend.

I wonder if we could make it as a single binary script like latte-xml-export.php or without .php (in the root of this repo) that users would just copy to bin folder (where usually the console script is), because I would like to keep the directory structure slim in this repository, and also it would be easier for users - they don't need to clone/download this repo.

With that in mind, it could try to require composer autoload and create nette container (via App\Bootstrap::boot()->createContainer()) or warn user if it could not be created - so user has to change that line or add extensions manually (some commented section in script at the start) when the script is run with no modification.

If the container is created, then we can use Latte\Engine::getExtensions() to retrieve all loaded extensions and generate config based on this, so there would be no additional work by the user, and all latte extensions would be exported to the xml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants