Documentation is available at classes_user_type.php
- <?php
- class user_type extends b_object {
- //NOTE - object type definition "user types"
- var $name;
- var $description;
- var $icon;
- function user_type( $constructID = NULL ) {
- parent::b_object( $constructID, 'user-types' );
- }
- //NOTE: these functions are here to overload the base class functions if special data validation etc is needed
- //function &get_attribute( $attribute ) { }
- //function set_attribute( $attribute, $value ) { }
- //function set( $values ) { }
- //function set_db( $values ) { }
- //function set_object( $values ) { }
- //function delete() { }
- function get_contents( $navArray = NULL ) {
- //format navigation array
- //unset( $navArray['permissions'] );
- //format object diplay fields
- $rawFieldArray = $this->type->get_attribute( 'type_object_field_list' );
- return parent::get_contents( $navArray, $rawFieldArray );
- }
- function get_index() {
- if( $this->name ) {
- $objectIndex = $this->name;
- } else {
- $objectIndex = "new user type";
- }
- return $objectIndex;
- }
- function verify_set( $post ) {
- //verifies data before setting the object's values - returns an error array if problems are found
- $returnArray = array();
- if( $post['description'] && !($post['name'] || $this->name) ) {
- $returnArray['name'] = 'no name specified';
- $returnArray['description'] = 'no name specified';
- }
- if( !count($returnArray) ) {
- //THIS IS CRITICAL if you want to be able to relate things to the object
- parent::verify_set( $post );
- } else {
- $GLOBALS['errorArray'] = $returnArray;
- $this->set_object( $post );
- }
- }
- }
- ?>
Documentation generated on Tue, 24 May 2005 03:57:19 -0400 by phpDocumentor 1.3.0RC3