setTwig() public method

public setTwig ( Twig_Environment $twig )
$twig Twig_Environment
 public function getFunctions()
 {
     return [new Twig_SimpleFunction('ng_render_field', function (Twig_Environment $environment, Field $field, array $params = []) {
         $this->fieldBlockRenderer->setTwig($environment);
         return $this->renderField($field, $params);
     }, ['is_safe' => ['html'], 'needs_environment' => true])];
 }
 public function getFunctions()
 {
     return array(new Twig_SimpleFunction('ez_render_fielddefinition_edit', function (Twig_Environment $twig, FieldDefinitionData $fieldDefinitionData, array $params = []) {
         $this->fieldBlockRenderer->setTwig($twig);
         return $this->renderFieldDefinitionEdit($fieldDefinitionData, $params);
     }, ['is_safe' => ['html'], 'needs_environment' => true]));
 }
 public function getFunctions()
 {
     return array(new Twig_SimpleFunction('ez_render_field', function (Twig_Environment $environment, Content $content, $fieldIdentifier, array $params = []) {
         $this->fieldBlockRenderer->setTwig($environment);
         return $this->renderField($content, $fieldIdentifier, $params);
     }, ['is_safe' => ['html'], 'needs_environment' => true]), new Twig_SimpleFunction('ez_render_fielddefinition_settings', function (Twig_Environment $environment, FieldDefinition $fieldDefinition, array $params = []) {
         $this->fieldBlockRenderer->setTwig($environment);
         return $this->renderFieldDefinitionSettings($fieldDefinition, $params);
     }, ['is_safe' => ['html'], 'needs_environment' => true]));
 }
 public function initRuntime(Twig_Environment $environment)
 {
     $this->fieldBlockRenderer->setTwig($environment);
 }