mikemix/zf2-tidy-filter

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (0.2) of this package.

TIDY filter for Zend Framework 2

0.2 2015-01-27 20:18 UTC

This package is auto-updated.

Last update: 2020-05-10 21:21:31 UTC


README

"Tidy" filter for Zend Framework 2

Usage in forms

Example form:

<?php
namespace Application\Form;

use Zend\Form\Form;
use Zend\InputFilter\InputFilterProviderInterface;
use zf2filter\Filter\TidyFilter;

class ExampleForm extends Form implements InputFilterProviderInterface
{
    function init()
    {
        $this->add([
            'name' => 'html',
            'type' => 'textarea',
        ]);
    }
    
    public function getInputFilterSpecification()
    {
        return [
            'html' => [
                'required' => true,
                'filters'  => [
                    ['name' => TidyFilter::class]
                ],
            ],
        ];
    }
}