code: public function createService(ServiceLocatorInterface $serviceLocator)
      {
          /** @var \ZfcTwig\moduleOptions $options */
          $options = $serviceLocator->get('ZfcTwig\ModuleOptions');
  
          $renderer = new TwigRenderer(
              $serviceLocator->get('Zend\View\View'),
              $serviceLocator->get('Twig_Loader_Chain'),
              $serviceLocator->get('Twig_Environment'),
              $serviceLocator->get('ZfcTwig\View\TwigResolver')
          );
  
          $renderer->setCanRenderTrees($options->getDisableZfmodel());
          $renderer->setHelperPluginManager($serviceLocator->get('ZfcTwigViewHelperManager'));
  
          return $renderer;
      }
docs: Create service
  
  @param ServiceLocatorInterface $serviceLocator
  @return TwigRenderer