wmde/fundraising-content-provider

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

fundraising-content-provider

Build Status

A wrapper around htmlpurifier and twig to purify fundraising-frontend-content content before rendering it into FundraisingFrontend.

Using fundraising-frontend-content inside 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');

Running lints

# 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

Development

Run phpunit tests
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)

Release notes

Version 2.0 (2017-04-28)
Version 1.0 (2017-04-26)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.