49
|
1 package Form::Transform;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4 use base qw(IMPL::Transform);
|
|
5
|
|
6 sub CTOR {
|
|
7 my ($this) = @_;
|
|
8
|
|
9 $this->superCTOR(
|
|
10 Templates => {
|
|
11 'Form::Container' => sub { my $this = shift; $this->TransformContainer(@_); },
|
|
12 'Form' => sub { my $this = shift; $this->TransformContainer(@_); }
|
|
13 },
|
|
14 Default => \&TransformItem
|
|
15 );
|
|
16 }
|
|
17
|
|
18 sub TransformContainer {
|
|
19 my ($this,$container) = @_;
|
|
20 }
|
|
21
|
|
22 sub TransformItem {
|
|
23 my ($this,$item) = @_;
|
|
24 return $item->isEmpty ? undef : $item->Value;
|
|
25 }
|
|
26
|
|
27
|
|
28
|
|
29 1;
|