* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Renderer; use Symfony\Component\Form\FieldInterface; use Symfony\Component\Form\Renderer\Engine\EngineInterface; class FieldRenderer implements RendererInterface { private $field; private $engine; public function __construct(FieldInterface $field, EngineInterface $engine) { $this->field = $field; $this->engine = $engine; } protected function getField() { return $this->field; } protected function getEngine() { return $this->engine; } public function __toString() { return $this->widget(); } /** * Renders the HTML enctype in the form tag, if necessary * * Example usage in Twig templates: * *