dolibarr 20.0.0
Ctyperesource Class Reference

Class Ctyperesource. More...

Inheritance diagram for Ctyperesource:
Collaboration diagram for Ctyperesource:

Public Member Functions

 __construct (DoliDB $db)
 Constructor.
 
 create (User $user, $notrigger=0)
 Create object into database.
 
 fetch ($id, $code='', $label='')
 Load object in memory from the database.
 
 fetchAll ($sortorder='', $sortfield='', $limit=0, $offset=0, $filter='', $filtermode='AND')
 Load object in memory from the database.
 
 update (User $user, $notrigger=0)
 Update object into database.
 
 delete (User $user, $notrigger=0)
 Delete object in database.
 
 createFromClone (User $user, $fromid)
 Load an object from its id and create a new one in database.
 
 initAsSpecimen ()
 Initialise object with example values Id must be 0 if object instance is a specimen.
 

Detailed Description

Class Ctyperesource.

Definition at line 35 of file ctyperesource.class.php.

Constructor & Destructor Documentation

◆ __construct()

Ctyperesource::__construct ( DoliDB $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 58 of file ctyperesource.class.php.

Member Function Documentation

◆ create()

Ctyperesource::create ( User $user,
$notrigger = 0 )

Create object into database.

Parameters
User$userUser that creates
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int Return integer <0 if KO, Id of created object if OK

Definition at line 70 of file ctyperesource.class.php.

References dol_syslog().

◆ createFromClone()

Ctyperesource::createFromClone ( User $user,
$fromid )

Load an object from its id and create a new one in database.

Parameters
User$userUser making the clone
int$fromidId of object to clone
Returns
int New id of clone

Definition at line 405 of file ctyperesource.class.php.

References $object, and dol_syslog().

◆ delete()

Ctyperesource::delete ( User $user,
$notrigger = 0 )

Delete object in database.

Parameters
User$userUser that deletes
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 354 of file ctyperesource.class.php.

References dol_syslog().

◆ fetch()

Ctyperesource::fetch ( $id,
$code = '',
$label = '' )

Load object in memory from the database.

Parameters
int$idId object
string$codecode
string$labelLabel
Returns
int Return integer <0 if KO, 0 if not found, >0 if OK

Definition at line 143 of file ctyperesource.class.php.

References dol_syslog().

◆ fetchAll()

Ctyperesource::fetchAll ( $sortorder = '',
$sortfield = '',
$limit = 0,
$offset = 0,
$filter = '',
$filtermode = 'AND' )

Load object in memory from the database.

Parameters
string$sortorderSort Order
string$sortfieldSort field
int$limitLimit
int$offsetOffset limit
string | array$filterfilter array
string$filtermodefilter mode (AND or OR)
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 206 of file ctyperesource.class.php.

References dol_syslog(), and forgeSQLFromUniversalSearchCriteria().

◆ initAsSpecimen()

Ctyperesource::initAsSpecimen ( )

Initialise object with example values Id must be 0 if object instance is a specimen.

Returns
int

Definition at line 453 of file ctyperesource.class.php.

◆ update()

Ctyperesource::update ( User $user,
$notrigger = 0 )

Update object into database.

Parameters
User$userUser that modifies
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 288 of file ctyperesource.class.php.

References dol_syslog().


The documentation for this class was generated from the following file: