« blib/lib/OpusVL/AppKit/Schema/AppKitAuthDB/Result/UsersRole.pm
↑ Summary
blib/lib/OpusVL/AppKit/View/AppKitTT.pm »
| 1 | package OpusVL::AppKit::Schema::AppKitAuthDB::ResultSet::Aclfeature; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use base 'DBIx::Class::ResultSet'; | ||
| 7 | |||
| 8 | sub sorted | ||
| 9 | { | ||
| 10 | my $self = shift; | ||
| 11 | return $self->search(undef, { order_by => ['feature'] }); | ||
| 12 | } | ||
| 13 | |||
| 14 | sub descriptions | ||
| 15 | { | ||
| 16 | my $self = shift; | ||
| 17 | my @all = $self->all; | ||
| 18 | my %names; | ||
| 19 | for my $f (@all) | ||
| 20 | { | ||
| 21 | my ($app, $feature) = $f->feature =~ m|^(.+)/(.*)$|; | ||
| 22 | # auto vivification? | ||
| 23 | $names{$app}->{$feature} = $f->feature_description; | ||
| 24 | } | ||
| 25 | return \%names; | ||
| 26 | } | ||
| 27 | |||
| 28 | 1; | ||
| 29 | |||
| 30 | __END__ | ||
| 31 | |||
| 32 | =pod | ||
| 33 | |||
| 34 | =encoding UTF-8 | ||
| 35 | |||
| 36 | =head1 NAME | ||
| 37 | |||
| 38 | OpusVL::AppKit::Schema::AppKitAuthDB::ResultSet::Aclfeature | ||
| 39 | |||
| 40 | =head1 VERSION | ||
| 41 | |||
| 42 | version 2.22 | ||
| 43 | |||
| 44 | =head1 AUTHOR | ||
| 45 | |||
| 46 | OpusVL - www.opusvl.com | ||
| 47 | |||
| 48 | =head1 COPYRIGHT AND LICENSE | ||
| 49 | |||
| 50 | This software is copyright (c) 2010 by OpusVL - www.opusvl.com. | ||
| 51 | |||
| 52 | This is free software; you can redistribute it and/or modify it under | ||
| 53 | the same terms as the Perl 5 programming language system itself. | ||
| 54 | |||
| 55 | =cut |