Append a template render action to the render queue
@param  string $template  The template file
@param  string $target_id The dachi-ui-block to load into
@return null
977235
public static function display($template, $target_id) {
		if(self::$twig === null)
			self::initialize();

		self::$render_actions[] = array(
			"type"      => "display_tpl",
			"template"  => $template,
			"target_id" => $target_id
		);
	}
221868
public function addTemplate($template_id_short) {
		$data = $this->getData('/cgi-bin/template/api_add_template', [
			'access_token' => $this->getAccessToken(),
		], Json::encode([
			'template_id_short' => $template_id_short,
		]));

		if($this->errcode == 0) {
			return $data['template_id'];
		}

		return null;
	}
1194725
public function deleteTemplate($template_id)
    {

        $response = $this->rest->post(
            static::TEMPLATE_DELETE_PATH . '/' . $template_id
        );

        $this->checkResponse($response, false);

        return true;
    }
404631
protected function formActionForSelect(ContaoBackendViewTemplate $template)
    {
        $environment = $this->getEnvironment();
        if (!$template->get('select')
            || ('select' !== $environment->getInputProvider()->getParameter('act'))
        ) {
            return;
        }

        $actionUrlEvent = new AddToUrlEvent('select=properties');
        $environment->getEventDispatcher()->dispatch(ContaoEvents::BACKEND_ADD_TO_URL, $actionUrlEvent);

        $template->set('action', $actionUrlEvent->getUrl());
    }
1171771
public function render(Smarty_Internal_Template $_template, $no_output_filter = true)
    {
        if ($this->isCached($_template)) {
            if ($_template->smarty->debugging) {
                $_template->smarty->_debug->start_cache($_template);
            }
            if (!$this->processed) {
                $this->process($_template);
            }
            $this->getRenderedTemplateCode($_template);
            if ($_template->smarty->debugging) {
                $_template->smarty->_debug->end_cache($_template);
            }
            return;
        } else {
            $_template->smarty->ext->_updateCache->updateCache($this, $_template, $no_output_filter);
        }
    }
723660
public function getBaseTemplate($target, $templateId){
        $base = $this->getResolvedBase($target);
        if(is_array($base) && isset($base['templates']) && isset($base['templates'][$templateId])){
            return $base['templates'][$templateId];
        }
        return null;
    }
1056746
public function deleteTemplate($template_id) {
		$data = $this->getData('/cgi-bin/template/del_private_template', [
			'access_token' => $this->getAccessToken(),
		], Json::encode([
			'template_id' => $template_id,
		]));

		return $this->errcode == 0;
	}
341124
function execTemplate( $id, $data = array(), $options = array() )
    {
        // execute the given template on the current document.
        if ( !isset( $this->ez['templates'][$id] ) )
        {
            return;
        }
        eval( $this->ez['templates'][$id]['code'] );
    }
568600
public function actionUpdate($id)
    {
        $emailTemplate = $this->loadModel($id);

        if (isset($_POST['EmailTemplate'])) {
            $emailTemplate->attributes = $_POST['EmailTemplate'];
            if ($emailTemplate->save()) {
                $this->redirect(array('template/view', 'id' => $emailTemplate->id));
            }
        }

        $this->render('update', array(
            'emailTemplate' => $emailTemplate,
        ));
    }
1267502
public static function Render($template=null, $data=null)
    {
        if ($template && $data) {
            return self::$renderer->render($template, $data);
        } else {
            self::$data = self::getData();
            self::$templates[] = "index";
            self::loadTemplate(self::$templates);
        }
    }
1354083
public function updateTemplateFiles($template_id, Template $request)
    {
      $params = $request->toUpdateParams();
      $response = $this->rest->post(
        static::TEMPLATE_UPDATE_FILES_PATH . '/' . $template_id,
        $params
      );

      return new Template($response);
    }
540188
public function template($template, $data = [])
    {
        $templatePath = self::$instance->app->findTemplate($template);
        echo self::$instance->renderTemplate($templatePath, $data);
    }
1139650
public function activeTemplate(Request $request, $id)
    {
        // Find Template
        $mailTemplate = $this
            ->getDoctrine()
            ->getRepository($this->getParameter('pd_mailer.mail_template_class'))
            ->findOneBy(['id' => $id]);
        if (!$mailTemplate) throw $this->createNotFoundException();

        // Set Status
        $mailTemplate->setStatus(!$mailTemplate->getStatus());

        // Save
        $em = $this->getDoctrine()->getManager();
        $em->persist($mailTemplate);
        $em->flush();

        // Message
        $this->addFlash('success', 'changes_saved');

        // Redirect Back
        return $this->redirect($request->headers->get('referer') ?? $this->generateUrl('admin_mail_list'));
    }
1013984
public function render($context, $targetDir)
    {
        $this->apiContext = $context;
        $this->_targetDir = $targetDir;

        $types = array_merge($context->classes, $context->interfaces, $context->traits);
        $typeCount = count($types) + 1;

        if ($this->controller !== null) {
            Console::startProgress(0, $typeCount, 'Rendering files: ', false);
        }
        $done = 0;
        foreach ($types as $type) {
            $fileContent = $this->renderWithLayout($this->typeView, [
                'type' => $type,
                'apiContext' => $context,
                'types' => $types,
            ]);
            file_put_contents($targetDir . '/' . $this->generateFileName($type->name), $fileContent);

            if ($this->controller !== null) {
                Console::updateProgress(++$done, $typeCount);
            }
        }

        $indexFileContent = $this->renderWithLayout($this->indexView, [
            'apiContext' => $context,
            'types' => $types,
        ]);
        file_put_contents($targetDir . '/index.html', $indexFileContent);

        if ($this->controller !== null) {
            Console::updateProgress(++$done, $typeCount);
            Console::endProgress(true);
            $this->controller->stdout('done.' . PHP_EOL, Console::FG_GREEN);
        }
    }
1176659
public ResponseBuilder addRenderTemplateDirective(Template template) {
        RenderTemplateDirective templateDirective = RenderTemplateDirective.builder()
                .withTemplate(template)
                .build();
        return addDirective(templateDirective);
    }
556654
public function twigRender ($template_file = null, $render = null, $template_dir_list = [], $options = []) {
		$this->renderSetting();
		$template = $this->twigLoadFileTemplate($template_file, $template_dir_list, $options);
		$render = $this->adjustRender($render);
		return $template->render($render);
	}
134805
public function render($template, $data = NULL, $return = FALSE)
    {
        if (isset($data)) {
            $this->set_data($data);
        }
        // Compile and run template
        $compiled = $this->_compile($template);
        $content  = $this->_run($compiled, $this->_data);
        if (!$return) {
            $this->output->append_output($content);
        }

        return $content;
    }