Commit | Line | Data |
632f0e07 |
1 | package App::SCS::Role::PageChildren; |
2 | |
3 | use Moo::Role; |
4 | |
f50b4a35 |
5 | requires '_page_set'; |
632f0e07 |
6 | requires '_page_set_class'; |
7 | requires '_top_dir'; |
8 | requires '_my_path'; |
9 | |
10 | sub children { |
11 | my ($self, %args) = @_; |
12 | if (my $at = delete $args{at_depth}) { |
13 | @args{qw(min_depth max_depth)} = ($at, $at); |
14 | } |
15 | $self->_page_set_class->new( |
16 | top_dir => $self->_top_dir, |
17 | base_dir => $self->_my_path, |
18 | max_depth => 1, |
f50b4a35 |
19 | plugin_config => $self->_page_set->plugin_config, |
632f0e07 |
20 | %args, |
21 | ); |
22 | } |
23 | |
24 | 1; |