Difference between revisions of "Freeside:1.9:Documentation:Developer/FS/access group"

From Freeside
Jump to: navigation, search
(import from POD)
(import from POD)
Line 43: Line 43:
 
==BUGS==
 
==BUGS==
 
==SEE ALSO==
 
==SEE ALSO==
[[Freeside:1.9:Documentation:Developer/FS::Record|FS/Record]], schema.html from the base documentation.
+
[[Freeside:1.9:Documentation:Developer/FS/Record|FS::Record]], schema.html from the base documentation.

Revision as of 16:18, 3 October 2007

NAME

FS::access_group - Object methods for access_group records

SYNOPSIS

 use FS::access_group;

 $record = new FS::access_group \%hash;
 $record = new FS::access_group { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::access_group object represents an access group. FS::access_group inherits from FS::Record. The following fields are currently supported:

groupnum - primary key; groupname - Access group name

METHODS

new HASHREF
Creates a new access group. To add the access group to the database, see "insert"|#insert|"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 access group. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
access_groupagent
Returns all associated FS::access_groupagent records.
access_rights
Returns all associated FS::access_right records.
access_right RIGHTNAME
Returns the specified FS::access_right record. Can be used as a boolean, to test if this group has the given RIGHTNAME.

BUGS

SEE ALSO

FS::Record, schema.html from the base documentation.