wolnosciowiec / content-compiler-bundle
Converts everything into HTML
Installs: 75
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Type:symfony-bundle
Requires
- php: >=7.0
- erusev/parsedown: >=1.5
- ezyang/htmlpurifier: ~4.7
- symfony/security: >=2.8
Requires (Dev)
- phpunit/phpunit: ~6
- symfony/framework-bundle: >=3.2
- symfony/http-foundation: >=3.2
- symfony/security: >=3.2
- symfony/symfony: >=3.2
- symfony/var-dumper: *
- twig/twig: ^2.2
Suggests
- ext-dom: For HTML purifying (closing opened tags)
This package is not auto-updated.
Last update: 2024-12-08 02:47:37 UTC
README
Converts everything to HTML, including conversion from Markdown to HTML.
In short words it's an interface for conversion to HTML with some example implementations made.
/* * WolnoĆciowiec / ContentCompilerBundle * ------------------------------------- * * Converts everything to HTML, including conversion from Markdown to HTML. * A part of an anarchist portal - wolnosciowiec.net * * WolnoĆciowiec is a project to integrate the movement * of people who strive to build a society based on * solidarity, freedom, equality with a respect for * individual and cooperation of each other. * * We support human rights, animal rights, feminism, * anti-capitalism (taking over the production by workers), * anti-racism, and internationalism. We negate * the political fight and politicians at all. * * http://wolnosciowiec.net/ * * License: LGPLv3 */
Setup
- Add to
AppKernel
- Use as a service :-)
Example:
// twig var_dump($this->contentCompilerFactory ->getContentCompiler('twig') ->compileFromString('Monkeys are eating {{ fruitName }}', false, [ ContentCompilerInterface::VARIABLES => ['fruitName' => 'banana'], ]) ); // markdown var_dump($this->contentCompilerFactory ->getContentCompiler('markdown') ->compileFromString('# Bananas are everywhere') );