mikemix/zf2-tidy-filter

此包已被 废弃,不再维护。没有建议的替代包。
关于此包最新版本(0.2)没有可用的许可信息。

Zend Framework 2 的 TIDY 过滤器

0.2 2015-01-27 20:18 UTC

This package is auto-updated.

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


README

"Tidy" 过滤器用于 Zend Framework 2

表单中使用

示例表单

<?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]
                ],
            ],
        ];
    }
}