[Form] Removed deprecated form_enctype()
This commit is contained in:
parent
d6af4d6efa
commit
c6b049f4e0
@ -61,7 +61,6 @@ class FormExtension extends \Twig_Extension
|
||||
public function getFunctions()
|
||||
{
|
||||
return array(
|
||||
new \Twig_SimpleFunction('form_enctype', null, array('node_class' => 'Symfony\Bridge\Twig\Node\FormEnctypeNode', 'is_safe' => array('html'))),
|
||||
new \Twig_SimpleFunction('form_widget', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))),
|
||||
new \Twig_SimpleFunction('form_errors', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))),
|
||||
new \Twig_SimpleFunction('form_label', null, array('node_class' => 'Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode', 'is_safe' => array('html'))),
|
||||
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Bridge\Twig\Node;
|
||||
|
||||
/**
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
|
||||
* the helper "form_start()" instead.
|
||||
*/
|
||||
class FormEnctypeNode extends SearchAndRenderBlockNode
|
||||
{
|
||||
public function compile(\Twig_Compiler $compiler)
|
||||
{
|
||||
parent::compile($compiler);
|
||||
|
||||
$compiler->write('trigger_error(\'The helper form_enctype(form) is deprecated since version 2.3 and will be removed in 3.0. Use form_start(form) instead.\', E_USER_DEPRECATED)');
|
||||
}
|
||||
}
|
@ -281,10 +281,6 @@
|
||||
</form>
|
||||
{%- endblock form_end %}
|
||||
|
||||
{% block form_enctype -%}
|
||||
{% if multipart %}enctype="multipart/form-data"{% endif %}
|
||||
{%- endblock form_enctype %}
|
||||
|
||||
{% block form_errors -%}
|
||||
{% if errors|length > 0 -%}
|
||||
<ul>
|
||||
|
Reference in New Issue
Block a user