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

Class for accesing price expression table. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 create ($user, $notrigger=0)
 Create object into database. More...
 
 fetch ($id)
 Load object in memory from the database. More...
 
 list_price_expression ()
 List all price expressions. More...
 
 find_title ($title)
 Returns any existing rowid with specified title. More...
 
 update ($user=0, $notrigger=0)
 Update object into database. More...
 
 delete (User $user, $notrigger=0)
 Delete object in database. More...
 
 initAsSpecimen ()
 Initialise object with example values Id must be 0 if object instance is a specimen. More...
 

Public Attributes

 $db
 To store db handler.
 
 $error
 To return error code (or message)
 
 $errors =array()
 To return several error codes (or messages)
 

Detailed Description

Class for accesing price expression table.

Definition at line 30 of file price_expression.class.php.

Constructor & Destructor Documentation

PriceExpression::__construct (   $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

Definition at line 45 of file price_expression.class.php.

References $db.

Member Function Documentation

PriceExpression::create (   $user,
  $notrigger = 0 
)

Create object into database.

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

Definition at line 59 of file price_expression.class.php.

References $error, $resql, and dol_syslog().

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

Delete object in database.

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

Definition at line 297 of file price_expression.class.php.

References $error, $resql, and dol_syslog().

PriceExpression::fetch (   $id)

Load object in memory from the database.

Parameters
int$idId object
Returns
int < 0 if KO, 0 if OK but not found, > 0 if OK

Definition at line 122 of file price_expression.class.php.

References $resql, and dol_syslog().

PriceExpression::find_title (   $title)

Returns any existing rowid with specified title.

Parameters
String$titleTitle of expression
Returns
int < 0 if KO, 0 if OK but not found, > 0 rowid

Definition at line 202 of file price_expression.class.php.

References $resql, and dol_syslog().

PriceExpression::initAsSpecimen ( )

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

Returns
void

Definition at line 353 of file price_expression.class.php.

PriceExpression::list_price_expression ( )

List all price expressions.

Returns
array Array of price expressions

Definition at line 164 of file price_expression.class.php.

References $resql, and dol_syslog().

PriceExpression::update (   $user = 0,
  $notrigger = 0 
)

Update object into database.

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

Definition at line 237 of file price_expression.class.php.

References $error, $resql, and dol_syslog().


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