Mercurial > pub > Impl
comparison Lib/Schema/Form/Field.pm @ 0:03e58a454b20
Создан репозитарий
| author | Sergey |
|---|---|
| date | Tue, 14 Jul 2009 12:54:37 +0400 |
| parents | |
| children | 16ada169ca75 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:03e58a454b20 |
|---|---|
| 1 package Schema::Form::Field; | |
| 2 use strict; | |
| 3 use Common; | |
| 4 use base qw(Schema::Form::Item); | |
| 5 | |
| 6 BEGIN { | |
| 7 DeclareProperty Format => ACCESS_READ; | |
| 8 } | |
| 9 | |
| 10 sub CTOR { | |
| 11 my ($this,%args) = @_; | |
| 12 | |
| 13 $args{'Format'} or die new Exception('A format is required for a field'); | |
| 14 | |
| 15 $args{'Attributes'} = { %{$args{Format}->Attributes},%{$args{Attributes} || {} } }; | |
| 16 | |
| 17 $this->SUPER::CTOR(@args{qw(Name isMulti Filters Attributes)}); | |
| 18 $this->{$Format} = $args{'Format'}; | |
| 19 } | |
| 20 | |
| 21 =pod | |
| 22 Ñíà÷àëà ïðèìåíèòü ôèëüòðû ôîðìàòà à ïîòîì ôèëüòðû ïîëÿ | |
| 23 =cut | |
| 24 sub Filters { | |
| 25 my ($this) = @_; | |
| 26 | |
| 27 my @filters = $this->{$Format}->Filters; | |
| 28 push @filters,$this->SUPER::Filters; | |
| 29 | |
| 30 return @filters; | |
| 31 } | |
| 32 | |
| 33 1; |
