diff options
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 bc72cf9da..2599f24ae 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -892,5 +892,18 @@ has get_cobrand_logged => ( }, ); +sub pin_data { + my ($self, $c, $page, %opts) = @_; + my $colour = $c->cobrand->pin_colour($self, $page); + + { + latitude => $self->latitude, + longitude => $self->longitude, + colour => $colour, + id => $self->id, + title => $opts{private} ? $self->title : $self->title_safe, + problem => $self, + } +} 1; |