Freeside:3:Documentation:Developer/FS/tower
From Freeside
Contents
NAME
FS::tower - Object methods for tower records
SYNOPSIS
use FS::tower; $record = new FS::tower \%hash; $record = new FS::tower { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::tower object represents a tower. FS::tower inherits from FS::Record. The following fields are currently supported:
- towernum
- primary key
- towername
- Tower name
- disabled
- Disabled flag, empty or 'Y'
METHODS
- new HASHREF
- Creates a new tower. To add the tower 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.
- insert
- Adds this record to the database. If there is an error, returns the error, otherwise returns false.
- delete
- Delete this record from the database.
- replace OLD_RECORD
- Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
- check
- Checks all fields to make sure this is a valid tower. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- default_sector
- Returns the default sector.
- tower_sector
- Returns the sectors of this tower, as FS::tower_sector objects (see FS::tower_sector), except for the default sector.
- process_o2m
- Wrapper for the default method (see FS::o2m_Common) to manage the default sector.