APISchedule - staffcheck/api GitHub Wiki

APISchedule

  • Class name: APISchedule
  • Namespace:
  • Parent class: APIFactory

Properties

$main_class

protected mixed $main_class = 'ScheduleFactory'
  • Visibility: protected

$data

public mixed $data = array()
  • Visibility: public

$main_class_obj

protected mixed $main_class_obj = NULL
  • Visibility: protected

$AMF_message_id

protected mixed $AMF_message_id = NULL
  • Visibility: protected

$pager_obj

protected mixed $pager_obj = NULL
  • Visibility: protected

$current_company

protected mixed $current_company = NULL
  • Visibility: protected

$current_user

protected mixed $current_user = NULL
  • Visibility: protected

$current_user_prefs

protected mixed $current_user_prefs = NULL
  • Visibility: protected

$permission

protected mixed $permission = NULL
  • Visibility: protected

$progress_bar_obj

protected mixed $progress_bar_obj = NULL
  • Visibility: protected

Methods

__construct

mixed APIFactory::__construct()

APIFactory constructor.

  • Visibility: public
  • This method is defined by APIFactory

getScheduleDefaultData

array APISchedule::getScheduleDefaultData(array $data)

Get default schedule data for creating new schedulees.

  • Visibility: public

Arguments

  • $data array

getCombinedSchedule

array|boolean APISchedule::getCombinedSchedule(array $data, integer $base_date, null $type, null $strict)

Get combined recurring schedule and committed schedule data for one or more schedulees.

  • Visibility: public

Arguments

  • $data array - filter data
  • $base_date integer - EPOCH
  • $type null
  • $strict null

getSchedule

array|boolean APISchedule::getSchedule(array $data, boolean $disable_paging)

Get schedule data for one or more schedulees.

  • Visibility: public

Arguments

  • $data array - filter data
  • $disable_paging boolean

exportSchedule

array APISchedule::exportSchedule(string $format, array $data, boolean $disable_paging)

Export wage data to csv

  • Visibility: public

Arguments

  • $format string - file format (csv)
  • $data array - filter data
  • $disable_paging boolean

getCommonScheduleData

array APISchedule::getCommonScheduleData(array $data)

Get only the fields that are common across all records in the search criteria. Used for Mass Editing of records.

  • Visibility: public

Arguments

  • $data array - filter data

validateSchedule

array APISchedule::validateSchedule(array $data)

Validate schedule data for one or more schedulees.

  • Visibility: public

Arguments

  • $data array - schedule data

setSchedule

array APISchedule::setSchedule(array $data, boolean $validate_only, boolean $ignore_warning)

Set schedule data for one or more schedulees.

  • Visibility: public

Arguments

  • $data array - schedule data
  • $validate_only boolean
  • $ignore_warning boolean

deleteSchedule

array|boolean APISchedule::deleteSchedule(array $data)

Delete one or more schedules.

  • Visibility: public

Arguments

  • $data array - schedule data

getScheduleTotalTime

array|boolean APISchedule::getScheduleTotalTime(integer $start, integer $end, integer $schedule_policy_id, string $user_id)

Get schedule total time

  • Visibility: public

Arguments

  • $start integer - Start date epoch
  • $end integer - End date epoch
  • $schedule_policy_id integer - Schedule policy ID
  • $user_id string - UUID

swapSchedule

array APISchedule::swapSchedule(array $src_ids, array $dst_ids)

Swap schedules with one another. This doesn't work with recurring schedules, and is not used by Flex currently.

  • Visibility: public

Arguments

  • $src_ids array - Source schedule IDs
  • $dst_ids array - Destination schedule IDs

addPunchesFromScheduledShifts

array|boolean APISchedule::addPunchesFromScheduledShifts(array $schedule_arr)

Creates punches from an array of scheduled shift ids.

  • Visibility: public

Arguments

  • $schedule_arr array - should have 2 sub arrays of integer ids, one labeled 'schedule', one labeled 'recurring'

getProtocolVersion

integer APIFactory::getProtocolVersion()
  • Visibility: public
  • This method is defined by APIFactory

getAMFMessageID

boolean|null APIFactory::getAMFMessageID()
  • Visibility: public
  • This method is defined by APIFactory

setAMFMessageID

boolean APIFactory::setAMFMessageID(string $id)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $id string - UUID

getCurrentCompanyObject

boolean|\CompanyFactory APIFactory::getCurrentCompanyObject()
  • Visibility: public
  • This method is defined by APIFactory

getCurrentUserObject

boolean|\UserFactory APIFactory::getCurrentUserObject()
  • Visibility: public
  • This method is defined by APIFactory

getCurrentUserPreferenceObject

boolean|\UserPreferenceFactory APIFactory::getCurrentUserPreferenceObject()
  • Visibility: public
  • This method is defined by APIFactory

getPermissionObject

boolean|null|\Permission APIFactory::getPermissionObject()
  • Visibility: public
  • This method is defined by APIFactory

getProgressBarObject

null|\ProgressBar APIFactory::getProgressBarObject()
  • Visibility: public
  • This method is defined by APIFactory

setPagerObject

boolean APIFactory::setPagerObject(object $lf)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $lf object

getPagerData

array|boolean APIFactory::getPagerData()
  • Visibility: public
  • This method is defined by APIFactory

setMainClassObject

boolean APIFactory::setMainClassObject(object $obj)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $obj object

getMainClassObject

string APIFactory::getMainClassObject()
  • Visibility: public
  • This method is defined by APIFactory

initializeFilterAndPager

array|boolean APIFactory::initializeFilterAndPager(array $data, boolean $disable_paging)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $data array
  • $disable_paging boolean

handlePermissionFilterColumns

array|null APIFactory::handlePermissionFilterColumns(array $filter_columns, array $allowed_columns)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $filter_columns array
  • $allowed_columns array

convertToSingleRecord

mixed APIFactory::convertToSingleRecord(array $data)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $data array

convertToMultipleRecords

array APIFactory::convertToMultipleRecords(array $data)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $data array

exportRecords

array|boolean APIFactory::exportRecords(string $format, string $file_name, array $result, array $filter_columns)

downloaded a result_set as a csv.

  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $format string
  • $file_name string
  • $result array
  • $filter_columns array

getNextInsertID

string APIFactory::getNextInsertID()
  • Visibility: public
  • This method is defined by APIFactory

getPermissionChildren

array APIFactory::getPermissionChildren()
  • Visibility: public
  • This method is defined by APIFactory

returnHandler

array|boolean APIFactory::returnHandler(boolean $retval, boolean $code, boolean $description, boolean $details, boolean $validator_stats, boolean $user_generic_status_batch_id, boolean $request_data)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $retval boolean
  • $code boolean
  • $description boolean
  • $details boolean
  • $validator_stats boolean
  • $user_generic_status_batch_id boolean
  • $request_data boolean

stripReturnHandler

mixed APIFactory::stripReturnHandler(mixed $retarr)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $retarr mixed

getOptions

array|boolean APIFactory::getOptions(boolean $name, string|integer $parent)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $name boolean
  • $parent string|integer

getVariableToFunctionMap

array APIFactory::getVariableToFunctionMap(string $name, string|integer $parent)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $name string
  • $parent string|integer

convertAPIReturnHandlerToValidatorObject

boolean|\Validator APIFactory::convertAPIReturnHandlerToValidatorObject($api_retarr, boolean $validator_obj)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $api_retarr mixed
  • $validator_obj boolean

setValidationArray

array|boolean APIFactory::setValidationArray(string $primary_validator, string $secondary_validator, boolean $tertiary_validator)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $primary_validator string - UUID
  • $secondary_validator string - UUID
  • $tertiary_validator boolean

handleRecordValidationResults

array APIFactory::handleRecordValidationResults(object|boolean $validator, array $validator_stats, integer $key, array|boolean $save_result)
  • Visibility: public
  • This method is defined by APIFactory

Arguments

  • $validator object|boolean
  • $validator_stats array
  • $key integer
  • $save_result array|boolean
⚠️ **GitHub.com Fallback** ⚠️