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

Class for accessing price expression table. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 create (User $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 $user, $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...
 

Detailed Description

Class for accessing price expression table.

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

Constructor & Destructor Documentation

◆ __construct()

PriceExpression::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

◆ create()

PriceExpression::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 86 of file price_expression.class.php.

◆ delete()

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 Return integer <0 if KO, >0 if OK

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

◆ fetch()

PriceExpression::fetch (   $id)

Load object in memory from the database.

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

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

◆ find_title()

PriceExpression::find_title (   $title)

Returns any existing rowid with specified title.

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

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

References $sql, and dol_syslog().

◆ initAsSpecimen()

PriceExpression::initAsSpecimen ( )

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

Returns
int

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

◆ list_price_expression()

PriceExpression::list_price_expression ( )

List all price expressions.

Returns
PriceExpression[]|int Array of price expressions, <0 if ko

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

References $sql, and dol_syslog().

◆ update()

PriceExpression::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 242 of file price_expression.class.php.


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