[Form] Removed deprecated form_enctype()

This commit is contained in:
Saro0h 2014-12-26 19:00:47 +01:00
parent d6af4d6efa
commit c6b049f4e0
3 changed files with 0 additions and 33 deletions

View File

@ -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'))),

View File

@ -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)');
}
}

View File

@ -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>