diff Lib/IMPL/Web/View/TTControl.pm @ 343:9bdccdf1f50b

Added a templates context
author cin
date Fri, 13 Sep 2013 12:53:15 +0400
parents 1090c1dd7429
children f05634287ac7
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTControl.pm	Wed Jul 03 03:53:12 2013 +0400
+++ b/Lib/IMPL/Web/View/TTControl.pm	Fri Sep 13 12:53:15 2013 +0400
@@ -7,7 +7,7 @@
 use IMPL::declare {
 	require => {
 	    TemplateDocument => 'Template::Document',
-        TTContext => 'Template::Context',
+        TTContext => 'IMPL::Web::View::TTContext',
         Exception => 'IMPL::Exception',
         ArgumentException => '-IMPL::InvalidArgumentException',
         OperationException => '-IMPL::InvalidOperationException'
@@ -138,19 +138,6 @@
     }
 }
 
-sub CloneContext {
-    my ($this) = @_;
-    
-    $this->context->localise();
-    
-    my $args = { %{$this->context} };
-    delete $args->{CONFIG};
-    
-    $this->context->delocalise();
-    
-    return TTContext->new($args);
-}
-
 sub CreateControlFromTemplate {
     my ($this,$template,$args) = @_;
     
@@ -163,7 +150,7 @@
     } else {
         return $this->new(
             $template,
-            $this->CloneContext(),
+            $this->context->clone(),
             $args
         );
     }