mikemix/zf2-tidy-filter

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-01-19 08:10:38 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]
                ],
            ],
        ];
    }
}