Methods summary
	
		| 
			 public 
			
			
			 | 
		#
		__construct( )
			Initialize Staff Overrides | 
	
		| 
			 public 
			integer
			
			 | 
		#
		add( array $vars )
			Add a staff member Parameters
					$varsAn array of staff member info including: 
user_id The user ID belonging to this staff memberfirst_name The first name of this staff memberlast_name The last name of this staff memberemail The email address of this staff memberemail_mobile The mobile email address of this staff member (optional)number_mobile The mobile phone number of this staff member (optional)status The status of this staff member 'active', 'inactive' (optional, default active)groups An array of staff group IDs this staff member belongs toReturns
					integerThe ID of the staff member added, void on error
 | 
	
		| 
			 public 
			
			
			 | 
		#
		edit( integer $staff_id, array $vars )
			Updates the given staff member with only the values given in $vars 
			Updates the given staff member with only the values given in $vars Parameters
					$staff_idThe ID of the staff member to update$varsAn array of staff member info including: 
first_name The first name of this staff member (optional)last_name The last name of this staff member (optional)email The email address of this staff member (optional)email_mobile The mobile email address of this staff member (optional)number_mobile The mobile phone number of this staff member (optional)status The status of this staff member 'active', 'inactive' (optional, default 'active')groups An array of staff group IDs this staff member belongs to (optional) | 
	
		| 
			 public 
			
			
			 | 
		#
		delete( integer $staff_id )
			Permanently removes the staff member from the system 
			Permanently removes the staff member from the system Deprecated
						since version 4.1.0
 Parameters
					$staff_idThe ID of the staff member to remove from the system | 
	
		| 
			 public 
			
			
			 | 
		#
		assignGroup( integer $staff_id, integer $staff_group_id )
			Assigns the given staff ID to the given staff group ID 
			Assigns the given staff ID to the given staff group ID Parameters
					$staff_idThe ID of the staff member to assign to the given group$staff_group_idThe ID of the staff group to assign to the given staff member | 
	
		| 
			 public 
			
			
			 | 
		#
		addNotice( array $vars )
			Adds a staff email notice 
			Adds a staff email notice Parameters
					$varsAn array of staff notice information including: 
staff_group_id The ID of the staff group this notice will be added tostaff_id The ID of the staff memberaction The email group action | 
	
		| 
			 public 
			
			
			 | 
		#
		addNotices(  $staff_id,  $staff_group_id, array $actions )
			Adds multiple staff email notices 
			Adds multiple staff email notices Parameters
					$staff_idID of the staff member$staff_group_idID of the staff group these notices will be added to$actionsA list of staff notices, each containing: 
action The email group action | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteNotice( integer $staff_id, integer $staff_group_id, string $action = null )
			Deletes the given staff group notice 
			Deletes the given staff group notice Parameters
					$staff_idThe ID of the staff member$staff_group_idThe ID of the staff group the notice belongs to$actionThe email group action to remove (optional, default null to delete all notices) | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		get( integer $staff_id, integer $company_id = null )
			Fetches a staff member and all associated staff settings and staff groups 
			Fetches a staff member and all associated staff settings and staff groups Parameters
					$staff_idThe ID of the staff member$company_idThe ID of the company to set staff settings for
 (optional, if null, no settings will be set)Returns
					mixedAn array of objects or false if no results.
 See | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		getByUserId( integer $user_id, integer $company_id = null )
			Fetches a staff member and all associated staff settings and staff groups 
			Fetches a staff member and all associated staff settings and staff groups Parameters
					$user_idThe ID of the user$company_idThe ID of the company to set staff settings for
 (optional, if null, no settings will be set)Returns
					mixedAn array of objects or false if no results.
 See | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAllByEmailAction( string $action, integer $company_id, string $notice_type = 'all', string $status = null )
			Fetches all staff members that can be sent the email corresponding to the given email group action 
			Fetches all staff members that can be sent the email corresponding to the given email group action Parameters
					$actionThe email group action representing an email type$company_idThe ID of the company whose staff members to fetch from$notice_typeThe type of email notice to fetch (optional) one of: 
all Any email notice typenull Notice types that are not setbcc BCC notice typesto To notice types$statusThe status of the staff member ("active",
 "inactive", or null for all; optional, default null)Returns
					arrayA list of stdClass objects, each representing a staff member
 | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		getList( integer $company_id = null, string $status = null, integer $page = 1, string $order_by = ['id' => 'ASC'] )
			Fetches a list of all staff members 
			Fetches a list of all staff members Parameters
					$company_idThe company ID to fetch (optional, default null)$statusThe status of the staff member to retrieve ('active', 'inactive', default null for all)$pageThe page to return results for$order_byThe sort and order conditions (e.g. array('sort_field'=>"ASC"), optional)Returns
					mixedAn array of objects when $count is false, an integer when $count is true, or false if no results.
 | 
	
		| 
			 public 
			integer
			
			 | 
		#
		getListCount( integer $company_id = null, string $status = null )
			Returns the total number of staff members returned from Staff::getList(),
useful in constructing pagination for the getList() method. 
			Returns the total number of staff members returned from Staff::getList(),
useful in constructing pagination for the getList() method. Parameters
					$company_idThe company ID to fetch (optional, default null)$statusThe status of the staff member to retrieve ('active', 'inactive', default null for all)Returns
					integerThe total number of staff members
 See | 
	
		| 
			 public 
			array
			
			 | 
		#
		getAll( integer $company_id = null, string $status = null, integer $staff_group_id = null )
			Returns a list of all staff members 
			Returns a list of all staff members Parameters
					$company_idThe ID of the company from which to fetch staff (optional)$statusThe status of the staff to fetch ('active' or 'inactive', null for all)$staff_group_idThe ID of the client group that the staff must belong to (optional)Returns
					arrayA list of stdClass objects each representing a staff member
 | 
	
		| 
			 public 
			array
			
			 | 
		#
		getNotices( integer $staff_id, integer $staff_group_id = null, boolean $group_by_action = true )
			Fetches all staff group notices 
			Fetches all staff group notices Parameters
					$staff_idThe ID of the staff member$staff_group_idThe ID of the staff group (optional, default null for all)$group_by_actionTrue to group by the action, false otherwise (optional, default true)Returns
					arrayA list of all staff group notices
 | 
	
		| 
			 public 
			
			
			 | 
		#
		addQuickLink( integer $staff_id, integer $company_id, array $vars )
			Adds a quicklink for a staff member 
			Adds a quicklink for a staff member Parameters
					$staff_idThe staff ID of this staff member$company_idThe company ID of this staff member$varsAn array of quicklink info including: 
uri The URI of the link to savetitle The title of this quicklinkorder The sort order of this quicklink (optional, default 0) | 
	
		| 
			 public 
			
			
			 | 
		#
		deleteQuickLink( integer $staff_id, integer $company_id, string $uri )
			Removes a quicklink for a staff member 
			Removes a quicklink for a staff member Parameters
					$staff_idThe staff ID of this staff member$company_idThe company ID of this staff member$uriThe URI of the link to remove | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		getQuickLinks( integer $staff_id, integer $company_id )
			Retrieves all quicklinks for a given staff member 
			Retrieves all quicklinks for a given staff member Parameters
					$staff_idThe staff ID of this staff member$company_idThe company ID of this staff memberReturns
					mixedAn array of objects representing the quicklinks, or false if none exist
 | 
	
		| 
			 public 
			
			
			 | 
		#
		sendNotificationEmail( string $action, integer $company_id, array $tags = null, mixed $cc = null, mixed $bcc = null, array $attachments = null, array $options = null  )
			Sends the notification email matching the given action to all staff members that should receive it.
Sets Input errors on error 
			Sends the notification email matching the given action to all staff members that should receive it.
Sets Input errors on error Parameters
					$actionThe action that specifies the email group to use$company_idThe company ID to send this email under$tagsAn array of replacement tags containing the
 key/value pairs for the replacements where the key is the tag to
 replace and the value is the value to replace it with (optional; A
 'staff' tag will automatically be set)$ccThe CC address(es) to send to. A string, or an array of email addresses$bccThe BCC address(es) to send to. A string, or an array of email addresses$attachmentsA multi-dimensional array of attachments containing: 
path The path to the attachment on the file systemname The name of the attachment (optional, default '')encoding The file encoding (optional, default 'base64')type The type of attachment (optional, default 'application/octet-stream')$optionsAn array of options including: 
to_client_id The ID of the client the message was sent tofrom_staff_id The ID of the staff member the message was sent fromfrom The from addressfrom_name The from namereply_to The reply to address | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		getSettings( integer $staff_id, integer $company_id )
			Fetch all settings that may apply to this staff member. Settings are inherited
in the order of staff_settings -> company_settings -> settings
where "->" represents the left item inheriting (and overwriting in the
case of duplicates) values found in the right item. 
			Fetch all settings that may apply to this staff member. Settings are inherited
in the order of staff_settings -> company_settings -> settings
where "->" represents the left item inheriting (and overwriting in the
case of duplicates) values found in the right item. Parameters
					$staff_idThe staff ID to retrieve settings for$company_idThe company ID to retrieve settings forReturns
					mixedAn array of objects containg key/values for the settings, false if no records found
 | 
	
		| 
			 public 
			mixed
			
			 | 
		#
		getSetting( integer $staff_id, string $key, integer $company_id = null )
			Fetch a single setting by key name 
			Fetch a single setting by key name Parameters
					$staff_idThe ID of the staff member to fetch the setting for$keyThe key name of the setting to fetch$company_idThe ID of the company to inherit settings fromReturns
					mixedAn stdObject containg the key and value, false if no such key exists
 | 
	
		| 
			 public 
			
			
			 | 
		#
		setSettings( integer $staff_id, array $vars )
			Add multiple staff settings, if duplicate key update the setting 
			Add multiple staff settings, if duplicate key update the setting Parameters
					$staff_idThe ID for the specified staff member$varsA single dimensional array of key/value pairs of settings | 
	
		| 
			 public 
			
			
			 | 
		#
		setSetting( integer $staff_id, string $key, string $value )
			Add a staff setting, if duplicate key update the setting 
			Add a staff setting, if duplicate key update the setting Parameters
					$staff_idThe ID for the specified staff member$keyThe key for this staff setting$valueThe value for this staff setting | 
	
		| 
			 public 
			
			
			 | 
		#
		unsetSetting( integer $staff_id, string $key )
			Delets a staff setting Parameters
					$staff_idThe ID for the specified staff member$keyThe key for this staff setting | 
	
		| 
			 public 
			
			
			 | 
		#
		saveClientsWidgetsState( integer $staff_id, integer $company_id, array $widgets )
			Saves the current state of the clients widget boxes 
			Saves the current state of the clients widget boxes Parameters
					$staff_idThe ID of the staff member to save the widget box state for$company_idThe ID of the company to save the widget box state for (in combination with $staff_id)$widgetsAn array of widget state information keyed by widget name including: 
open Whether or not the box is open (true/false) | 
	
		| 
			 public 
			array
			
			 | 
		#
		getClientsWidgetsState( integer $staff_id, integer $company_id )
			Fetch the current state of the clients widget boxes 
			Fetch the current state of the clients widget boxes Parameters
					$staff_idThe ID of the staff member to fetch the widget box state for$company_idThe ID of the company to fetch the widget box state for (in combination with $staff_id)Returns
					arrayAn array of widget box state data
 | 
	
		| 
			 public 
			
			
			 | 
		#
		saveHomeWidgetsState( integer $staff_id, integer $company_id, array $widgets )
			Saves the current state of the home (dashboard) widget boxes 
			Saves the current state of the home (dashboard) widget boxes Parameters
					$staff_idThe ID of the staff member to save the widget box state for$company_idThe ID of the company to save the widget box state for (in combination with $staff_id)$widgetsAn array of widget state information keyed by widget name including: 
open Whether or not the box is open (true/false) | 
	
		| 
			 public 
			array
			
			 | 
		#
		getHomeWidgetsState( integer $staff_id, integer $company_id )
			Fetch the current state of the home (dashboard) widget boxes 
			Fetch the current state of the home (dashboard) widget boxes Parameters
					$staff_idThe ID of the staff member to fetch the widget box state for$company_idThe ID of the company to fetch the widget box state for (in combination with $staff_id)Returns
					arrayAn array of widget box state data
 | 
	
		| 
			 public 
			
			
			 | 
		#
		saveBillingWidgetsState( integer $staff_id, integer $company_id, array $widgets )
			Saves the current state of the billing (dashboard) widget boxes 
			Saves the current state of the billing (dashboard) widget boxes Parameters
					$staff_idThe ID of the staff member to save the widget box state for$company_idThe ID of the company to save the widget box state for (in combination with $staff_id)$widgetsAn array of widget state information keyed by widget name including: 
open Whether or not the box is open (true/false) | 
	
		| 
			 public 
			array
			
			 | 
		#
		getBillingWidgetsState( integer $staff_id, integer $company_id )
			Fetch the current state of the billing (dashboard) widget boxes 
			Fetch the current state of the billing (dashboard) widget boxes Parameters
					$staff_idThe ID of the staff member to fetch the widget box state for$company_idThe ID of the company to fetch the widget box state for (in combination with $staff_id)Returns
					arrayAn array of widget box state data
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		validateStatus( string $status )
			Validates the staff's 'status' field 
			Validates the staff's 'status' field Parameters
					$statusThe status to checkReturns
					booleanTrue if validated, false otherwise
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		validateUniqueCompanies( array $group_ids )
			Validates that none of the staff group IDs given belong to the same company 
			Validates that none of the staff group IDs given belong to the same company Parameters
					$group_idsAn array of staff group IDsReturns
					booleanTrue if none of the staff group IDs belong to the same company, false otherwise
 | 
	
		| 
			 public 
			boolean
			
			 | 
		#
		validateNoticeActionExists( string $action, integer $staff_group_id )
			Validates that the given action is available for this staff group 
			Validates that the given action is available for this staff group Parameters
					$actionThe email group action$staff_group_idThe ID of the staff group to checkReturns
					booleanTrue if the staff group has the action available, false otherwise
 |