PHP 클래스 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.
저자: Michael J Rubinsky ([email protected])
상속: extends Horde_Core_Ajax_Application_Handler
파일 보기 프로젝트 열기: horde/horde

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
_readSearchForm ( ) Reads the search form submitted and return the search criteria

메소드 상세

_readSearchForm() 보호된 메소드

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

addTimer() 공개 메소드

- client_id: - deliverable_id: - jobtype_id:
public addTimer ( ) : array
리턴 array An array with an 'id' key.

createJobType() 공개 메소드

- 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
리턴 integer The type id of the newly created type.

deleteDeliverable() 공개 메소드

public deleteDeliverable ( )

deleteJobType() 공개 메소드

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

deleteSlice() 공개 메소드

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

enterTime() 공개 메소드

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

getDeliverableDetail() 공개 메소드

listDeliverables() 공개 메소드

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

listDeliverablesSelect() 공개 메소드

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
리턴 array @see Hermes::getCostObjectType

listJobTypes() 공개 메소드

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

listTimers() 공개 메소드

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

loadSlices() 공개 메소드

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
리턴 array An array of time slice data.

pauseTimer() 공개 메소드

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

poll() 공개 메소드

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

startTimer() 공개 메소드

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

stopTimer() 공개 메소드

- restart:
public stopTimer ( ) : array
리턴 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() 공개 메소드

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

updateDeliverable() 공개 메소드

- 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() 공개 메소드

- 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
리턴 boolean True on success/false on failure.

updateSlice() 공개 메소드

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