* * For the full copyright and license infieldation, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Renderer\Plugin; use Symfony\Component\Form\Renderer\RendererInterface; use Symfony\Component\Form\FieldInterface; class MaxLengthPlugin implements PluginInterface { private $maxLength; public function __construct($maxLength) { $this->maxLength = $maxLength; } /** * Renders the HTML enctype in the field tag, if necessary * * Example usage in Twig templates: * * * * @param Form $field The field for which to render the encoding type */ public function setUp(RendererInterface $renderer) { $renderer->setVar('max_length', $this->maxLength); } }