2017 © Pedro Peláez
 

library zf-nl2br

Provides a ZF2 filter for the php nl2br function

image

bfolliot/zf-nl2br

Provides a ZF2 filter for the php nl2br function

  • Sunday, April 12, 2015
  • by bfolliot
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

BFolliot\Zf-Nl2br

Provides a ZF2 filter for the php nl2br function, (*1)

Installation

BFolliot\Zf-Nl2br is available through composer. Add "BFolliot/Zf-Nl2br" to your composer.json list. You can specify the latest stable version of BFolliot\Zf-Nl2br:, (*2)

"BFolliot\Zf-Nl2br": "1.0.*"

To enable the module in your config/application.config.php file, add an entry BFolliot\ZfNl2br to the list of enabled modules., (*3)

Usage

In your input filter configuration, add the nl2br filter to filter the result. An example form:, (*4)

namespace Application\Form;

use Zend\InputFilter;
use Zend\Form\Form;

class Foo extends Form implements
    InputFilter\InputFilterProviderInterface
{
    public function __construct($name = null)
    {
        parent::__construct($name);

        $this->add(array(
            'name'    => 'text',
            'options' => array(
                'label' => 'Text'
            ),
            'attributes' => array(
                'type'  => 'textarea',
            ),
        ));
    }

    public function getInputFilterSpecification()
    {
        return array(
            'text'  => array(
                'required' => true,
                'filters'  => array(
                    array('name' => 'nl2br'),
                ),
            ),
        );
    }
}

The Versions

12/04 2015

dev-master

9999999-dev https://github.com/BFolliot/Zf-Nl2br

Provides a ZF2 filter for the php nl2br function

  Sources   Download

The Requires

  • php >=5.3.3.

 

by Bryan Folliot

filter zf2 html nl2br br new line

12/04 2015

1.0.0

1.0.0.0 https://github.com/BFolliot/Zf-Nl2br

Provides a ZF2 filter for the php nl2br function

  Sources   Download

The Requires

  • php >=5.3.3.

 

by Bryan Folliot

filter zf2 html nl2br br new line