aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Cobrand.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand.pm b/perllib/FixMyStreet/Cobrand.pm
index 9f61635d8..4b9f2bd0b 100644
--- a/perllib/FixMyStreet/Cobrand.pm
+++ b/perllib/FixMyStreet/Cobrand.pm
@@ -153,4 +153,14 @@ sub exists {
return 0;
}
+sub body_handler {
+ my ($class, $areas) = @_;
+
+ foreach my $avail ( $class->available_cobrand_classes ) {
+ my $cobrand = $class->get_class_for_moniker($avail->{moniker})->new({});
+ next unless $cobrand->can('council_id');
+ return $cobrand if $areas->{$cobrand->council_id};
+ }
+}
+
1;