diff options
author | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
commit | 987124b09a32248414faf4d0d6615d43b29ac6f6 (patch) | |
tree | a549db8af723c981d3b346e855f25d6fd5ff8aa7 /perllib/FixMyStreet/Cobrand.pm | |
parent | dbf56159e44c1560a413022451bf1a1c4cb22a52 (diff) | |
parent | a085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff) |
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/Cobrand.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand.pm | 10 |
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; |