diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Body.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Body.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index 037b69352..6dac8821c 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -127,4 +127,19 @@ sub areas { return \%ids; } +=head2 get_cobrand_handler + +Get a cobrand object for this body, if there is one. + +e.g. + * if the problem was sent to Bromley it will return ::Bromley + * if the problem was sent to Camden it will return nothing + +=cut + +sub get_cobrand_handler { + my $self = shift; + return FixMyStreet::Cobrand->body_handler($self->areas); +} + 1; |