1 package Reaction::UI::ViewPort::Field::RelatedObject;
4 use Scalar::Util 'blessed';
6 class RelatedObject is 'Reaction::UI::ViewPort::Field', which {
8 has value_map_method => (
9 isa => 'Str', is => 'ro', required => 1, default => sub { 'display_name' },
12 implements _build_value_string => as {
14 my $meth = $self->value_map_method;
15 my $value = $self->value;
16 return blessed($value) ? $value->$meth : $value;
19 implements _empty_value => as { undef };