Mercurial > pub > Impl
comparison Lib/IMPL/Web/View/TTDocument.pm @ 286:d357b5d85d25
*TTView refactoring
author | sergey |
---|---|
date | Mon, 18 Feb 2013 14:46:06 +0400 |
parents | 546957c50a36 |
children | 2d253e6e4a88 |
comparison
equal
deleted
inserted
replaced
285:546957c50a36 | 286:d357b5d85d25 |
---|---|
99 | 99 |
100 if ($template->class) { | 100 if ($template->class) { |
101 Loader->safe->Require($template->class); | 101 Loader->safe->Require($template->class); |
102 } | 102 } |
103 | 103 |
104 my @parts = split(/\/+/,$control); | |
105 | |
106 $this->controls->{$control} = $factory; | 104 $this->controls->{$control} = $factory; |
107 | 105 |
108 return $factory; | 106 return $factory; |
109 | 107 |
110 } else { | 108 } else { |
119 $args ||= {}; | 117 $args ||= {}; |
120 | 118 |
121 my $newArgs = hashMerge($this->creationArgs, $args); | 119 my $newArgs = hashMerge($this->creationArgs, $args); |
122 | 120 |
123 if ($this->layout) { | 121 if ($this->layout) { |
122 my $tlayout = $this->loader->layout($this->layout); | |
123 if(my $init = $tlayout->blocks->{INIT}) { | |
124 $this->context->process( | |
125 $init, | |
126 hashMerge( | |
127 $newArgs, | |
128 { | |
129 this => $this, | |
130 template => $this->template | |
131 } | |
132 ) | |
133 ); | |
134 } | |
124 return $this->context->include( | 135 return $this->context->include( |
125 $this->loader->layout($this->layout), | 136 $tlayout, |
126 { | 137 { |
127 %{$newArgs}, | 138 %{$newArgs}, |
128 content => $this->RenderContent($newArgs), | 139 content => $this->RenderContent($newArgs), |
129 this => $this, | 140 this => $this, |
130 template => $this->template | 141 template => $this->template |