1 package SGN
::Controller
::SiteFeatures
;
3 use namespace
::autoclean
;
5 use SGN
::View
::Mason
::CrossReference
'resolve_xref_component';
7 BEGIN {extends
'Catalyst::Controller::REST'; }
10 default => 'text/html',
13 'text/html' => [ 'View', 'BareMason' ],
19 SGN::Controller::SiteFeatures - Catalyst Controller
23 Catalyst controller for web services involving site features and
30 Public path: /api/v1/feature_xrefs
32 Web service interface to C<$c-E<gt>feature_xrefs>.
36 sub feature_xrefs
:Path
('/api/v1/feature_xrefs') :Args
(0) {
37 my ( $self, $c ) = @_;
39 no warnings
'uninitialized';
41 my $type = $c->req->param('render_type') || 'link';
44 if( my @exclude = split /,/, $c->req->param('exclude') ) {
45 $args->{exclude
} = \
@exclude;
48 my $xrefs = [ map $c->feature_xrefs( $_, $args ), grep /\S/, $c->req->param('q') ];
50 template
=> "/sitefeatures/mixed/xref_set/$type.mas",
63 This library is free software. You can redistribute it and/or modify
64 it under the same terms as Perl itself.
68 __PACKAGE__
->meta->make_immutable;