Name: fundraising-content-provider
Owner: Wikimedia Deutschland e.V.
Description: A class that removes unwanted HTML from content for the WMDE fundraising frontend
Created: 2017-04-11 11:29:51.0
Updated: 2017-04-26 09:14:23.0
Pushed: 2018-05-24 12:51:44.0
Homepage: null
Size: 62
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A wrapper around htmlpurifier and twig to purify fundraising-frontend-content content before rendering it into FundraisingFrontend.
$contentProvider = new ContentProvider( ['content_path' => '/my/fundraising-frontend-content'] );
// contents of fundraising-frontend-content/web & fundraising-frontend-content/shared
$contentProvider->getWeb('template_name');
// 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:7.1-cli ./bin/lint_content /contentpath/de_DE --web pages/imprint
docker run -it --rm --user $(id -u):$(id -g) -v "$PWD":/app -w /app php:7.1-cli ./vendor/bin/phpunit
(you have to have docker installed for this to work)
hr
, u
target="_blank"
attribute links (a
)