Mercurial > pub > Impl
comparison Lib/IMPL/Web/View/TTDocument.pm @ 298:78f767765706
TT view refactoring
author | cin |
---|---|
date | Tue, 19 Mar 2013 02:02:37 +0400 |
parents | 5d14baa35790 |
children | bf3af33b9003 |
comparison
equal
deleted
inserted
replaced
297:52aae1b85084 | 298:78f767765706 |
---|---|
65 my $path = $control; | 65 my $path = $control; |
66 | 66 |
67 if ( my $template = $self->loader->template($path) ) { | 67 if ( my $template = $self->loader->template($path) ) { |
68 | 68 |
69 $factory = new IMPL::Web::View::TTFactory( | 69 $factory = new IMPL::Web::View::TTFactory( |
70 $template->class || TTControl, | |
71 $template, | 70 $template, |
72 $documentContext, | 71 $documentContext, |
73 join( '/', splice( @{[split(/\//,$path)]}, 0, -1 ) ), | 72 join( '/', splice( @{[split(/\//,$path)]}, 0, -1 ) ), |
74 $require | 73 $require |
75 ); | 74 ); |
76 | |
77 if ($template->class) { | |
78 Loader->safe->Require($template->class); | |
79 } | |
80 | 75 |
81 $controls{$control} = $factory; | 76 $controls{$control} = $factory; |
82 | 77 |
83 return $factory; | 78 return $factory; |
84 | 79 |