% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::part_event_condition - Object methods for part_event_condition records
use FS::part_event_condition;
$record = new FS::part_event_condition \%hash;
$record = new FS::part_event_condition { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::part_event_condition object represents an event condition. FS::part_event_condition inherits from FS::Record. The following fields are currently supported:
Creates a new event. To add the example to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
If a list or hash reference of options is supplied, part_event_condition_option records are created (see FS::part_event_condition_option).
Delete this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
If a list or hash reference of options is supplied, part_event_condition_option records are created or modified (see FS::part_event_condition_option).
Checks all fields to make sure this is a valid example. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Reblesses the object into the FS::part_event::Condition::CONDITIONNAME class, where CONDITIONNAME is the object's conditionname field.
Return information about the available conditions. If an eventtable is specified, only return information about conditions available for that eventtable.
Information is returned as key-value pairs. Keys are condition names. Values are hashrefs with the following keys:
# =item default_weight
# =item deprecated
See FS::part_event::Condition for more information.
Returns a list of just the condition names
Returns an SQL fragment selecting joining all condition options for an event as tables titled "cond_conditionname". Typically used in conjunction with where_conditions_sql. OPTIONS should include 'time', the time to use in testing event conditions.
Returns an SQL fragment to select events which have unsatisfied conditions. Must be used in conjunction with join_conditions_sql.
The only current option is "time", the current time (or "pretend" current time as passed to freeside-daily), as a UNIX timestamp.
Returns an SQL fragment to order selected events. Must be used in conjunction with join_conditions_sql.
FS::part_event::Condition, FS::part_event, FS::Record, schema.html from the base documentation.