fsv / typography-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
Symfony typographer
dev-master
2016-05-10 11:52 UTC
Requires
- php: >=5.5.9
- michelf/php-smartypants: 1.6.x-dev
- symfony/symfony: ^2.7||^3.0
Requires (Dev)
- emuravjev/mdash: 3.5
- phpunit/phpunit: ~4.8
- squizlabs/php_codesniffer: ^2.6
Suggests
- ocramius/proxy-manager: Allows lazy initialization of the typographers
This package is not auto-updated.
Last update: 2022-10-15 07:49:51 UTC
README
Installation
$ composer require fsv/typography-bundle
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Fsv\TypographyBundle\FsvTypographyBundle(), ); }
For lazy typographers initialization:
$ composer require ocramius/proxy-manager:^1.0
Configuration
# app/config/config.yml fsv_typography: typographers: default: mdash: options: Text.paragraphs: off another: smartypants: attr: 1 service: id: my_service_id # ...
Disable form extension:
fsv_typography: enable_form_extension: false
Usage
// AppBundle\Form\Type\ExampleFormType.php public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('content', TextareaType::class, [ 'typography' => 'default' ]); // ... }
// AppBundle/Controller/ExampleController.php public function exampleAction() { // ... $content = $this->get('fsv_typography.typographer_map')->getTypographer('default')->typography($rawContent); $content = $this->get('fsv_typography.typographer_map.default')->typography($rawContent); // ... }