2017 © Pedro Peláez
 

library typography-bundle

Symfony typographer

image

fsv/typography-bundle

Symfony typographer

  • Tuesday, May 10, 2016
  • by sergeyfedotov
  • Repository
  • 2 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Symfony Typography Bundle

Build Status, (*1)

Installation

$ composer require fsv/typography-bundle
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Fsv\TypographyBundle\FsvTypographyBundle(),
    );
}

For lazy typographers initialization:, (*2)

$ 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:, (*3)

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);
    // ...
}

The Versions

10/05 2016

dev-master

9999999-dev

Symfony typographer

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony typographer smartypants mdash