diff options
author | Dave Arter <davea@mysociety.org> | 2017-02-01 12:50:22 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-02-08 09:41:14 +0000 |
commit | 804506834e0ef7c1d6d9ab21dece21a18651295f (patch) | |
tree | 7060cd5bf78b716d8b952465963a40fd374b0e18 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | f68f2bd46607be6cc141034e66af62bd3f64d9dd (diff) |
[Oxfordshire] Allow cobrand-specific traffic management options
Fixes mysociety/fixmystreetforcouncils#159
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index e42e7110a..0092dd8b5 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -1056,4 +1056,17 @@ has duplicates => ( }, ); +has traffic_management_options => ( + is => 'ro', + lazy => 1, + default => sub { + my $self = shift; + my $cobrand = $self->get_cobrand_logged; + if ( $cobrand->can('get_body_handler_for_problem') ) { + $cobrand = $cobrand->get_body_handler_for_problem( $self ); + } + return $cobrand->traffic_management_options; + }, +); + 1; |