Fix example yml config file.
[blog.pm.git] / lib / Blog / RDBO / Comment / Manager.pm
blob1e05ebe53522c1e7f5130df82f74d10971d894af
1 package Blog::RDBO::Comment::Manager;
3 use strict;
5 use base 'Rose::DB::Object::Manager';
7 use Blog::RDBO::Comment;
9 sub object_class { 'Blog::RDBO::Comment' }
11 __PACKAGE__->make_manager_methods( 'comments');
13 use Common::RDBO::Helper::Comment::Manager ':all';
15 sub recent {
16 my $self = shift;
17 my ( $limit ) = @_;
19 my $c = Blog->context;
21 return $self->get_recent(
22 query => [ 't3.lang' => $c->language ],
23 select => [ qw/ id post_id t2.id t2.key t3.i18nid content / ],
24 limit => $limit,
25 require_objects => [ 'post.post_i18n' ]
29 =head1 AUTHOR
31 vti
33 =head1 LICENSE
35 This library is free software, you can redistribute it and/or modify
36 it under the same terms as Perl itself.
38 =cut