Mercurial > pub > Impl
comparison Lib/IMPL/Web/View/TTDocument.pm @ 300:bf3af33b9003
sync
| author | cin |
|---|---|
| date | Fri, 22 Mar 2013 01:05:11 +0400 |
| parents | 78f767765706 |
| children | aeeb57a12046 |
comparison
equal
deleted
inserted
replaced
| 299:bd79145657e5 | 300:bf3af33b9003 |
|---|---|
| 15 }, | 15 }, |
| 16 base => [ | 16 base => [ |
| 17 'IMPL::Web::View::TTControl' => sub { | 17 'IMPL::Web::View::TTControl' => sub { |
| 18 my ($template,$ctx) = @_; | 18 my ($template,$ctx) = @_; |
| 19 $ctx ||= Template::Context->new(); | 19 $ctx ||= Template::Context->new(); |
| 20 return 'document', $template, $ctx; # context | 20 return $template, $ctx; # context |
| 21 } | 21 } |
| 22 ], | 22 ], |
| 23 props => [ | 23 props => [ |
| 24 layout => PROP_RW, | 24 layout => PROP_RW, |
| 25 loader => PROP_RW, | 25 loader => PROP_RW, |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 sub CTOR { | 29 sub CTOR { |
| 30 my ($this,$template,$ctx,$loader,$vars) = @_; | 30 my ($this,$template,$ctx,$loader,$vars) = @_; |
| 31 | 31 |
| 32 $this->controls({}); | |
| 33 $this->loader($loader) if $loader; | 32 $this->loader($loader) if $loader; |
| 34 | |
| 35 $this->layout( $template->layout ) unless $this->layout; | 33 $this->layout( $template->layout ) unless $this->layout; |
| 36 | 34 |
| 37 $this->context->stash->update($vars) | 35 $this->context->stash->update($vars) |
| 38 if ref $vars eq 'HASH'; | 36 if ref $vars eq 'HASH'; |
| 39 | |
| 40 $this->InitInstance(); | |
| 41 } | 37 } |
| 42 | 38 |
| 43 sub Render { | 39 sub Render { |
| 44 my ($this,$args) = @_; | 40 my ($this,$args) = @_; |
| 45 | 41 |
