aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm
blob: abea20f01bf8c06fff81b40f2c6cf63a5e99cc78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package Reaction::UI::ViewPort::Collection::Grid::Member;

use Reaction::Class;

use namespace::clean -except => [ qw(meta) ];
extends 'Reaction::UI::ViewPort::Object';

around _build_fields_for_type_Num => sub {
  $_[0]->(@_[1,2], { layout => 'value/number', %{ $_[3] || {}} })
};

around _build_fields_for_type_Int => sub {
  $_[0]->(@_[1,2], { layout => 'value/number', %{ $_[3] || {} } })
};

around _build_fields_for_type_Bool => sub {
  $_[0]->(@_[1,2], { layout => 'value/boolean', %{ $_[3] || {} } })
};

around _build_fields_for_type_Enum => sub {
  $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
};

around _build_fields_for_type_Str => sub {
  $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
};

around _build_fields_for_type_Reaction_Types_Core_SimpleStr => sub {
  $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
};

around _build_fields_for_type_Reaction_InterfaceModel_Object => sub {
  $_[0]->(@_[1,2], { layout => 'value/related_object', %{ $_[3] || {} } })
};

around _build_fields_for_type_Reaction_Types_DateTime_DateTime => sub {
  $_[0]->(@_[1,2], { layout => 'value/date_time', %{ $_[3] || {} } })
};

around _build_fields_for_type_Reaction_Types_Core_Password => sub { return };
around _build_fields_for_type_ArrayRef => sub { return };
around _build_fields_for_type_Reaction_InterfaceModel_Collection => sub { return };

#The types we'll be using going forward ...
around _build_fields_for_type_MooseX_Types_Common_String_Password => sub { return };
around _build_fields_for_type_MooseX_Types_Common_String_SimpleStr => sub {
  $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
};
around _build_fields_for_type_MooseX_Types_DateTime_DateTime => sub {
  $_[0]->(@_[1,2], { layout => 'value/date_time', %{ $_[3] || {} } })
};
around _build_fields_for_type_DateTime => sub {
  $_[0]->(@_[1,2], { layout => 'value/date_time', %{ $_[3] || {} } })
};


__PACKAGE__->meta->make_immutable;


1;