Difference between revisions of "Freeside:3:Documentation:Developer/FS/o2m Common"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
(No difference)
|
Latest revision as of 20:05, 27 June 2012
Contents
NAME
FS::o2m_Common - Mixin class for tables with a related table
SYNOPSIS
use FS::o2m_Common;
@ISA = qw( FS::o2m_Common FS::Record );
DESCRIPTION
FS::o2m_Common is intended as a mixin class for classes which have a related table.
METHODS
- process_o2m OPTION => VALUE, ...
- Available options:
- table (required) - Table into which the records are inserted.
- num_col (optional) - Column in table which links to the primary key of the base table. If not specified, it is assumed this has the same name.
- params (required) - Hashref of keys and values, often passed as scalar($cgi-Vars)> from a form.
- fields (required) - Arrayref of field names for each record in table. Pulled from params as "pkeyNN_field" where pkey is table's primary key and NN is the entry's numeric identifier.