/** * Execute the helper * * @param \Handlebars\Template $template The template instance * @param \Handlebars\Context $context The current context * @param array $args The arguments passed the the helper * @param string $source The source * * @return mixed */ public function execute(Template $template, Context $context, $args, $source) { $context->with($args); $buffer = $template->render($context); $context->pop(); return $buffer; }
/** * Execute the helper * * @param \Handlebars\Template $template The template instance * @param \Handlebars\Context $context The current context * @param \Handlebars\Arguments $args The arguments passed the the helper * @param string $source The source * * @return mixed */ public function execute(Template $template, Context $context, $args, $source) { $positionalArgs = $args->getPositionalArguments(); $context->with($positionalArgs[0]); $buffer = $template->render($context); $context->pop(); return $buffer; }