Property | Type | Description | |
---|---|---|---|
$_clients | array | List of available clients. |
Method | Description | |
---|---|---|
canEditTimeslice ( |
Determines if the current user can edit a specific timeslice according to the following rules: 'hermes:review' perms may edit any slice, the current user can edit his/her own slice prior to submitting it. Otherwise no editing allowed. | |
clearTimer ( integer $id ) | Clear a timer | |
getClientSelect ( string $id, boolean $multi = false, boolean $use_cotext = false ) : string | Return the HTML needed to build an enum or multienum for selecting clients. | |
getCostObjectByID ( string $id, string | boolean $employee = false ) : array | Return a cost object hash. | |
getCostObjectType ( mixed $client_ids = null ) : array | Return data for costobjects, optionally filtered by client_ids. | |
getCostObjects ( $client_ids = null, $external_only = false ) | Return a list of cost objects exported by available APIs, optionally filtered by client_ids. | |
getEmployeesType ( string $enumtype = 'multienum' ) : array | Get form control type for users. | |
getJobTypeData ( $params = [] ) | ||
getJobTypeSelect ( string $id, boolean $multi = false, $show_disabled = false ) : string | Return HTML needed to build an enum or multienum for jobtype selection. | |
getTimer ( $id ) : array | Return a specific timer. | |
listClients ( string $name = '' ) : array | Returns a list of available clients. | |
listTimers ( boolean $running_only = false ) : array | Return list of current timers. | |
makeExportHours ( array $hours ) : array | Rewrite an hours array into a format useable by Horde_Data:: | |
newTimer ( string $description, stdClass $details = null ) : integer | Create a new timer and save it to storage. Timers contain the following values: - name: (string) The descriptive name of the timer. | |
parseDate ( string $date ) : Horde_Date | Parses a complete date-time string into a Horde_Date object. | |
pauseTimer ( integer $id ) : boolean | Pause a timer. | |
showAjaxView ( ) : boolean | Returns true if we are showing the Ajax view. | |
tabs ( ) | ||
updateCostObject ( $slice ) | ||
updateTimer ( integer $id, array $timer ) | Update an existing timer. | |
url ( string $view, array $params = [] ) : Horde_Url | Return a URL to a specific view, taking self::showAjaxView() into account |
public static canEditTimeslice ( |
||
$id | ||
return |
public static clearTimer ( integer $id ) | ||
$id | integer | The timer id to clear/remove. |
public static getClientSelect ( string $id, boolean $multi = false, boolean $use_cotext = false ) : string | ||
$id | string | The DOM id to identify the select list. |
$multi | boolean | Allow multi select? |
$use_cotext | boolean | Instead of 'Select A Client', use 'General Cost Objects' for the top choice. |
return | string | The HTML to render the select element. |
public static getCostObjectByID ( string $id, string | boolean $employee = false ) : array | ||
$id | string | The cost object id. |
$employee | string | boolean | Employee hint - if known. False otherwise. |
return | array | The cost object hash. Keys differ depending on the API queried, but should always contain: - id: - name: |
public static getCostObjectType ( mixed $client_ids = null ) : array | ||
$client_ids | mixed | A client id or an array of client ids to filter cost obejcts by. |
return | array | An array of cost objects data. |
public static getCostObjects ( $client_ids = null, $external_only = false ) |
public static getEmployeesType ( string $enumtype = 'multienum' ) : array | ||
$enumtype | string | The type to return if we have list capability (should be either 'enum' or 'multienum'). |
return | array | A two-element array of the type and the type's parameters. |
public static listClients ( string $name = '' ) : array | ||
$name | string | The string to search for in the client name. |
return | array | A hash of client_id => client_name. |
public static listTimers ( boolean $running_only = false ) : array | ||
$running_only | boolean | Only return running timers if true. |
return | array | An array of timer hashes. |
public static makeExportHours ( array $hours ) : array | ||
$hours | array | This is an array of the results from $driver->getHours(). |
return | array | an array suitable for Horde_Data:: |
public static pauseTimer ( integer $id ) : boolean | ||
$id | integer | The timer id. |
return | boolean |
public static showAjaxView ( ) : boolean | ||
return | boolean |
public static updateTimer ( integer $id, array $timer ) | ||
$id | integer | The timer id. |
$timer | array | The timer hash. |
protected static array $_clients | ||
return | array |