PHP Class Hermes_Ajax_Application_Handler, horde

Copyright 2012-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Michael J Rubinsky ([email protected])
Inheritance: extends Horde_Core_Ajax_Application_Handler
Afficher le fichier Open project: horde/horde

Méthodes publiques

Méthode Description
addTimer ( ) : array Add a new timer. Expects the following in $this->vars: - desc: The timer description.
createJobType ( ) : integer Create a new jobtype. Takes the following from $this->vars: - name: (string) They type name.
deleteDeliverable ( )
deleteJobType ( ) Delete a jobtype. Takes the following in $this->vars: - id: The jobtype id to delete.
deleteSlice ( ) : boolean Remove a slice. Expects the following in $this->vars: - id: The slice ids
enterTime ( ) : array Enter a new time slice.
getDeliverableDetail ( )
listDeliverables ( ) Get the list of Hermes-only deliverables for the requested client.
listDeliverablesSelect ( ) : array Get a list of client deliverables suitable for building a select list.
listJobTypes ( ) : array Return descriptions of job types. If $this->vars->id is present it is used to filter by the requested id.
listTimers ( boolean $running_only = false ) : array Return the current list of timers.
loadSlices ( ) : array Fetch a collection of time slices. For now, just allows a search for all of a single employees time. Either submitted or not submitted.
pauseTimer ( ) : boolean Pause a timer. Expects the following data in $this->vars: - t: The timer id
poll ( ) : array Poll the server. Currently also returns the list of current timer data so the UI can be updated periodically.
search ( ) : array Perform a slice search.
startTimer ( ) : boolean | array Restart a paused timer. Expects the following data in $this->vars: - t: The timer id.
stopTimer ( ) : array Stop a timer. Expects the following in $this->vars: - t: The timer id.
submitSlices ( ) : boolean Mark slices as submitted. Expects the following in $this->vars: - items: The slice ids to submit.
updateDeliverable ( ) Create a new deliverable. Takes the following in $this->vars: - deliverable_id: The id of the deliverable if editing.
updateJobType ( ) : boolean Update an existing jobtype. Takes the following from $this->vars: - id: (integer) The type id of the exsting type.
updateSlice ( ) : array Update a slice.

Méthodes protégées

Méthode Description
_readSearchForm ( ) Reads the search form submitted and return the search criteria

Method Details

_readSearchForm() protected méthode

Reads the search form submitted and return the search criteria
protected _readSearchForm ( )

addTimer() public méthode

- client_id: - deliverable_id: - jobtype_id:
public addTimer ( ) : array
Résultat array An array with an 'id' key.

createJobType() public méthode

- billable: (boolean) Is this type billable? - enabled: (boolean) Is this type enabled? - rate: (double) The default hourly rate to use for this type.
public createJobType ( ) : integer
Résultat integer The type id of the newly created type.

deleteDeliverable() public méthode

public deleteDeliverable ( )

deleteJobType() public méthode

Delete a jobtype. Takes the following in $this->vars: - id: The jobtype id to delete.
public deleteJobType ( )

deleteSlice() public méthode

Remove a slice. Expects the following in $this->vars: - id: The slice ids
public deleteSlice ( ) : boolean
Résultat boolean

enterTime() public méthode

@see Hermes_Slice::readForm for the data expected to be sent in the posted form.
public enterTime ( ) : array
Résultat array The new timeslice

getDeliverableDetail() public méthode

listDeliverables() public méthode

- c: The client id - id: The optional deliverable id, if requesting a specific deliverable.
public listDeliverables ( )

listDeliverablesSelect() public méthode

Expects the following in $this->vars: - c: The client id, or an array of client ids if querying for specific clients. Returns all deliverables otherwise.
public listDeliverablesSelect ( ) : array
Résultat array @see Hermes::getCostObjectType

listJobTypes() public méthode

Return descriptions of job types. If $this->vars->id is present it is used to filter by the requested id.
public listJobTypes ( ) : array
Résultat array An array describing the type.

listTimers() public méthode

Return the current list of timers.
public listTimers ( boolean $running_only = false ) : array
$running_only boolean Only return running timers if true.
Résultat array An array of timer arrays. @see Hermes::listTimers()

loadSlices() public méthode

Expects the following values in $this->vars: - e: The employee id - s: Include submitted slices if true - sort: The sort-by value - dir: The sort direction
public loadSlices ( ) : array
Résultat array An array of time slice data.

pauseTimer() public méthode

Pause a timer. Expects the following data in $this->vars: - t: The timer id
public pauseTimer ( ) : boolean
Résultat boolean

poll() public méthode

Poll the server. Currently also returns the list of current timer data so the UI can be updated periodically.
public poll ( ) : array
Résultat array An array of timer arrays. @see self::listTimers()

startTimer() public méthode

Restart a paused timer. Expects the following data in $this->vars: - t: The timer id.
public startTimer ( ) : boolean | array
Résultat boolean | array If the timer is exclusive, returns a new list of timer data, otherwise true on success/false on failure.

stopTimer() public méthode

- restart:
public stopTimer ( ) : array
Résultat array An array describing the current timer state. Contains: - h: The total number of hours elapsed so far. - n: A note to apply to the description field of a time slice. - t: The new timer title, if restarting.

submitSlices() public méthode

Mark slices as submitted. Expects the following in $this->vars: - items: The slice ids to submit.
public submitSlices ( ) : boolean
Résultat boolean

updateDeliverable() public méthode

- name: (string) The deliverable name. - active: (boolean) Is the deliverable active? - estimate: (integer) The estimate for this deliverable. - desc: (string) The description. - client_id: (string) The client id this deliverable is for.
public updateDeliverable ( )

updateJobType() public méthode

- name: (string) They type name. - billable: (boolean) Is this type billable? - enabled: (boolean) Is this type enabled? - rate: (double) The default hourly rate to use for this type.
public updateJobType ( ) : boolean
Résultat boolean True on success/false on failure.

updateSlice() public méthode

@see Hermes_Slice::readForm() for the data expeted in the posted form.
public updateSlice ( ) : array
Résultat array The new slice data.