A wrapper around htmlpurifier and twig to purify fundraising-frontend-content content before rendering it into FundraisingFrontend.
$contentProvider = TwigContentProviderFactory::createContentProvider(
new TwigContentProviderConfig( '/my/fundraising-frontend-content/i18n/LOCALE/' )
);
// get contents of fundraising-frontend-content/web & fundraising-frontend-content/shared
$contentProvider->getWeb('template_name');
// get contents of fundraising-frontend-content/mail & fundraising-frontend-content/shared
$contentProvider->getMail('template_name');
# When installed as a dependency and PHP is available:
vendor/bin/lint_content /contentpath/de_DE --web pages/imprint
# running in a docker container
docker run -it --rm -v \
~/projects/fundraising-frontend-content/i18n:/contentpath -v \
"$PWD":/usr/src/myapp -w /usr/src/myapp php:8.0-alpine ./bin/lint_content /contentpath/de_DE --web pages/imprint
docker run -it --rm --user $(id -u):$(id -g) -v "$PWD":/app -w /app \
php:8.2-alpine ./vendor/bin/phpunit
(you have to have docker installed for this to work)