public function render(DataBuilder $data_builder, string $filetype, $parameters, array $data = [])
    {
        $result = new Result();

        try {
            $bag = new Bag($parameters);

            $bag->set('content', $this->renderRaw($filetype, strval($bag->get('content')), $data));

            $result->setResources(new Collection([$bag->toArray()]));
        } catch (\Twig_Error $e) {
            $e = new Exceptions\TemplateRenderException($e->getRawMessage().' on line '.$e->getTemplateLine());

            $result->addErrors(new Collection([$e]));
        }

        return $result;
    }