BexioProjectStatus
extends BexioAPI
in package
Uses
tBexioV2Api, tBexioObject, tBexioCollection
Represent the enpoint Project Status [read only]
Tags
Table of Contents
Constants
- type = 'pr_project_state'
Properties
- $className : string
- $ctx : BexioCTX
- $endpoint : string
- $ownerid : int|null
- $query : string
- $userid : int|null
Methods
- __construct() : mixed
- Create withing the given context.
- delete() : bool
- Delete an item in the collection.
- get() : BXObject
- Get an item from the collection
- getIdName() : string
- Return the property name used as unique id for this collection.
- getType() : string
- Get the current type.
- list() : array<string|int, BXObject>
- List the collection.
- new() : BXObject
- Create a new BXObject.
- newQuery() : BXquery
- Create a new BXQuery object for this collection.
- search() : array<string|int, BXObject>
- Search the collection.
- set() : BXObject|false
- Set an item in the collection
- setCurrentOwner() : void
- Set current owner id.
- setCurrentUser() : void
- Set current user id.
- update() : BXObject|false
- [!!!] Update an item in the collection
Constants
type
public
mixed
type
= 'pr_project_state'
Properties
$className
protected
string
$className
= 'BizCuit\\BXObject\\ProjectStatus'
$ctx
protected
BexioCTX
$ctx
$endpoint
protected
string
$endpoint
$ownerid
protected
int|null
$ownerid
= null
$query
protected
string
$query
= 'BizCuit\\BXQuery\\ProjectStatus'
$userid
protected
int|null
$userid
= null
Methods
__construct()
Create withing the given context.
public
__construct(BexioCTX $ctx) : mixed
Parameters
- $ctx : BexioCTX
-
The context in which the API will work.
delete()
Delete an item in the collection.
public
delete(int|string|BXObject $id) : bool
Parameters
- $id : int|string|BXObject
-
The id or the object to delete.
Return values
bool —True on success, false otherwise.
get()
Get an item from the collection
public
get(int|string|BXObject $id[, array<string|int, mixed> $options = [] ]) : BXObject
Parameters
- $id : int|string|BXObject
-
The id or the object to get.
- $options : array<string|int, mixed> = []
-
Options that can be passed as query string.
Return values
BXObject —The item as a BXObject.
getIdName()
Return the property name used as unique id for this collection.
public
getIdName() : string
Return values
string —ID name.
getType()
Get the current type.
public
getType() : string
The current type correspond to an endpoint in the upstream API.
Return values
string —The type name
list()
List the collection.
public
list([int $offset = 0 ][, int $limit = 500 ]) : array<string|int, BXObject>
Parameters
- $offset : int = 0
-
Offset in the search result,
- $limit : int = 500
-
Max number of search result.
Return values
array<string|int, BXObject> —Items in the collection.
new()
Create a new BXObject.
public
new() : BXObject
Return values
BXObject —New empty BXObject.
newQuery()
Create a new BXQuery object for this collection.
public
newQuery() : BXquery
Return values
BXquery —The BXQuery valid for this collection.
search()
Search the collection.
public
search(BXQuery $query[, int $offset = 0 ][, int $limit = 500 ]) : array<string|int, BXObject>
Parameters
- $query : BXQuery
-
The query object.
- $offset : int = 0
-
Offset in the search result,
- $limit : int = 500
-
Max number of search resutl.
Return values
array<string|int, BXObject> —Matching items in the collection.
set()
Set an item in the collection
public
set(BXObject $content) : BXObject|false
Setting an item would create the item if it don't have an ID or overwrite the item if it has an ID.
Parameters
- $content : BXObject
-
The object to be set.
Return values
BXObject|false —The item is returned as stored in collection or false in case of error
setCurrentOwner()
Set current owner id.
public
setCurrentOwner(int $ownerid) : void
Some items, at creation, need a user id and/or an owner id. This set the owner.
Parameters
- $ownerid : int
-
The id of the owner for all creation from now on.
setCurrentUser()
Set current user id.
public
setCurrentUser(int $userid) : void
Some items, at creation, need a user id and/or an owner id. Setting this here allows to automatically add this to the item. If only user is set, when owner is needed it would be set to user.
Parameters
- $userid : int
-
The id of the user for all creation from now on.
update()
[!!!] Update an item in the collection
public
update(BXObject $content) : BXObject|false
This should update property of an item. But the upstream API is buggy here, so no way to know what UPDATE does.
Parameters
- $content : BXObject
-
The object to be set.
Return values
BXObject|false —The item is returned as stored in collection or false in case of error