dolibarr  7.0.0-beta
Public Member Functions | List of all members
Ctyperesource Class Reference

Class Ctyperesource. More...

Public Member Functions

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

Detailed Description

Class Ctyperesource.

Put here description of your class

See also
CommonObject

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

Constructor & Destructor Documentation

Ctyperesource::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

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

Member Function Documentation

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

Create object into database.

Parameters
User$userUser that creates
bool$notriggerfalse=launch triggers after, true=disable triggers
Returns
int <0 if KO, Id of created object if OK

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

References $resql, and dol_syslog().

Ctyperesource::createFromClone (   $fromid)

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

Parameters
int$fromidId of object to clone
Returns
int New id of clone

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

References dol_syslog().

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

Delete object in database.

Parameters
User$userUser that deletes
bool$notriggerfalse=launch triggers after, true=disable triggers
Returns
int <0 if KO, >0 if OK

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

References $resql, and dol_syslog().

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

Load object in memory from the database.

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

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

References $resql, and dol_syslog().

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

Load object in memory from the database.

Parameters
string$sortorderSort Order
string$sortfieldSort field
int$limitoffset limit
int$offsetoffset limit
array$filterfilter array
string$filtermodefilter mode (AND or OR)
Returns
int <0 if KO, >0 if OK

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

References $resql, and dol_syslog().

Ctyperesource::initAsSpecimen ( )

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

Returns
void

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

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

Update object into database.

Parameters
User$userUser that modifies
bool$notriggerfalse=launch triggers after, true=disable triggers
Returns
int <0 if KO, >0 if OK

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

References $resql, and dol_syslog().


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