improve compatibility between template method I/F and data_only
[bse.git] / site / cgi-bin / modules / BSE / TB / ProductOptionValue.pm
CommitLineData
58baa27b
TC
1package BSE::TB::ProductOptionValue;
2use strict;
33d04a1b 3use parent "Squirrel::Row", "BSE::CustomData";
58baa27b 4
2bd7f190 5our $VERSION = "1.002";
cb7fd78d 6
58baa27b 7sub columns {
33d04a1b
TC
8 return qw/id product_option_id value display_order custom_data/;
9}
10
11sub defaults {
12 return
13 (
14 custom_data => undef,
15 );
58baa27b
TC
16}
17
18sub table {
19 "bse_product_option_values";
20}
21
22sub option {
23 my ($self) = @_;
24
25 require BSE::TB::ProductOptions;
26 return BSE::TB::ProductOptions->getByPkey($self->{product_option_id});
27}
28
2bd7f190
TC
29sub data_only {
30 my ($self) = @_;
31
32 my $result = $self->SUPER::data_only;
33 $result->{get_custom_all} = $self->get_custom_all;
34
35 $result;
36}
37
58baa27b 381;