diff options
author | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-09-12 18:11:34 +0000 |
---|---|---|
committer | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-09-12 18:11:34 +0000 |
commit | 7adfd53f17f66ffe93763e944ed1d3fc52a369dc (patch) | |
tree | 19e599e74419b41cbbe651fd226b81e8b73551d3 /lib/ComponentUI/TestModel | |
parent | c728c97cb1061330e63c7cc048e768ef74988fe6 (diff) | |
download | reaction-7adfd53f17f66ffe93763e944ed1d3fc52a369dc.tar.gz reaction-7adfd53f17f66ffe93763e944ed1d3fc52a369dc.zip |
moved shit to trunk
Diffstat (limited to 'lib/ComponentUI/TestModel')
-rw-r--r-- | lib/ComponentUI/TestModel/Bars.pm | 21 | ||||
-rw-r--r-- | lib/ComponentUI/TestModel/Baz.pm | 21 | ||||
-rw-r--r-- | lib/ComponentUI/TestModel/Foo.pm | 22 | ||||
-rw-r--r-- | lib/ComponentUI/TestModel/Foo/Action/CustomAction.pm | 9 |
4 files changed, 73 insertions, 0 deletions
diff --git a/lib/ComponentUI/TestModel/Bars.pm b/lib/ComponentUI/TestModel/Bars.pm new file mode 100644 index 0000000..0319400 --- /dev/null +++ b/lib/ComponentUI/TestModel/Bars.pm @@ -0,0 +1,21 @@ +package ComponentUI::TestModel::Bars; + +use lib 't/lib'; +use Reaction::InterfaceModel::DBIC::ObjectClass; + +class Bars, which{ + domain_model '_bars_store' => + (isa => 'RTest::TestDB::Bar', inflate_result => 1, + reflect => [qw(name foo published_at avatar)], + ); + + reflect_actions + ( + Create => { attrs =>[qw(name foo published_at avatar)] }, + Update => { attrs =>[qw(name foo published_at avatar)] }, + Delete => {}, + ); + +}; + +1; diff --git a/lib/ComponentUI/TestModel/Baz.pm b/lib/ComponentUI/TestModel/Baz.pm new file mode 100644 index 0000000..255673d --- /dev/null +++ b/lib/ComponentUI/TestModel/Baz.pm @@ -0,0 +1,21 @@ +package ComponentUI::TestModel::Baz; + +use lib 't/lib'; +use Reaction::InterfaceModel::DBIC::ObjectClass; + +class Baz, which{ + domain_model '_baz_store' => + (isa => 'RTest::TestDB::Baz', inflate_result => 1, + handles => ['display_name'], + reflect => [qw(id name foo_list)], + ); + + reflect_actions + ( + Create => { attrs =>[qw(name)] }, + Update => { attrs =>[qw(name)] }, + Delete => {}, + ); +}; + +1; diff --git a/lib/ComponentUI/TestModel/Foo.pm b/lib/ComponentUI/TestModel/Foo.pm new file mode 100644 index 0000000..73de6b6 --- /dev/null +++ b/lib/ComponentUI/TestModel/Foo.pm @@ -0,0 +1,22 @@ +package ComponentUI::TestModel::Foo; + +use lib 't/lib'; +use Reaction::InterfaceModel::DBIC::ObjectClass; + +class Foo, which{ + domain_model '_foo_store' => + (isa => 'RTest::TestDB::Foo', inflate_result => 1, + handles => ['display_name'], + reflect => [qw(id first_name last_name baz_list)], + ); + + reflect_actions + ( + Create => { attrs =>[qw(first_name last_name baz_list)] }, + Update => { attrs =>[qw(first_name last_name baz_list)] }, + Delete => {}, + CustomAction => { attrs =>[qw(last_name baz_list)] }, + ); +}; + +1; diff --git a/lib/ComponentUI/TestModel/Foo/Action/CustomAction.pm b/lib/ComponentUI/TestModel/Foo/Action/CustomAction.pm new file mode 100644 index 0000000..e6f3707 --- /dev/null +++ b/lib/ComponentUI/TestModel/Foo/Action/CustomAction.pm @@ -0,0 +1,9 @@ +package ComponentUI::TestModel::Foo::Action::CustomAction; + +use Reaction::Class; + +class CustomAction is 'Reaction::InterfaceModel::Action', which { + has first_name => (isa => 'NonEmptySimpleStr', is => 'rw', lazy_build => 1); +}; + +1; |