1 package FS::log_context;
4 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
10 FS::cust_main::Billing::bill_and_collect
11 FS::cust_main::Billing::bill
12 FS::cust_main::Billing_Realtime::realtime_verify_bop
14 FS::Misc::Geo::standardize_uscensus
15 FS::saved_search::send
16 FS::saved_search::render
17 FS::cust_location::process_district_update
24 upgrade_taxable_billpkgnum
25 freeside-ipifony-download
26 freeside-paymentech-upload
27 freeside-paymentech-download
32 FS::log_context - Object methods for log_context records
38 $record = new FS::log_context \%hash;
39 $record = new FS::log_context { 'column' => 'value' };
41 $error = $record->insert;
43 $error = $new_record->replace($old_record);
45 $error = $record->delete;
47 $error = $record->check;
51 An FS::log_context object represents a context tag attached to a log entry
52 (L<FS::log>). FS::log_context inherits from FS::Record. The following
53 fields are currently supported:
57 =item logcontextnum - primary key
59 =item lognum - lognum (L<FS::log> foreign key)
61 =item context - context
71 Creates a new context tag. To add the example to the database, see
74 Note that this stores the hash reference, not a distinct copy of the hash it
75 points to. You can ask the object for a copy with the I<hash> method.
79 sub table { 'log_context'; }
83 Adds this record to the database. If there is an error, returns the error,
84 otherwise returns false.
88 Delete this record from the database.
90 =item replace OLD_RECORD
92 Replaces the OLD_RECORD with this one in the database. If there is an error,
93 returns the error, otherwise returns false.
97 Checks all fields to make sure this is a valid example. If there is
98 an error, returns the error, otherwise returns false. Called by the insert
107 $self->ut_numbern('logcontextnum')
108 || $self->ut_number('lognum')
109 || $self->ut_text('context') #|| $self->ut_enum('context', \@contexts)
111 return $error if $error;
124 Returns a list of all valid contexts.
128 sub contexts { @contexts }
136 L<FS::Log>, L<FS::Record>, schema.html from the base documentation.