code/template/template.php
public function getContext(TemplateContextInterface $context = null)
    {
        $context = new TemplateContext($context);
        $context->setData($this->getData());
        $context->setParameters($this->getParameters());

        return $context;
    }
public function getContext(TemplateContextInterface $context = null)
    {
        $context = new TemplateContext($context);
        $context->setData($this->getData());
        $context->setParameters($this->getParameters());

        return $context;
    }
public function getContext ( TemplateContextInterface $ context = null ) { $ context = new TemplateContext ( $ context ) ; $ context -> setData ( $ this -> getData ( ) ) ; $ context -> setParameters ( $ this -> getParameters ( ) ) ; return $ context ; }
Get the template context

@param   TemplateContextInterface $context Context to cast to a local context
@return  TemplateContext
Get the template context