dolibarr  9.0.0
Public Member Functions | Private Member Functions | List of all members
Setup Class Reference
+ Inheritance diagram for Setup:
+ Collaboration diagram for Setup:

Public Member Functions

 __construct ()
 Constructor.
 
 getPaymentTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='')
 Get the list of payments types. More...
 
 getListOfCountries ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $filter='', $lang='', $sqlfilters='')
 Get the list of countries. More...
 
 getCountryByID ($id, $lang='')
 Get country by ID. More...
 
 getAvailability ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='')
 Get the list of delivery times. More...
 
 _cleanObjectDatas ($object)
 Clean sensible object datas. More...
 
 getListOfEventTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $type='', $module='', $sqlfilters='')
 Get the list of events types. More...
 
 getListOfCivility ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $module='', $sqlfilters='')
 Get the list of civility. More...
 
 getListOfExtrafields ($sortfield="t.pos", $sortorder='ASC', $type='', $sqlfilters='')
 Get the list of extra fields. More...
 
 getListOfTowns ($sortfield="zip,town", $sortorder='ASC', $limit=100, $page=0, $zipcode='', $town='', $sqlfilters='')
 Get the list of towns. More...
 
 getPaymentTerms ($sortfield="sortorder", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='')
 Get the list of payments terms. More...
 
 getTicketsCategories ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='')
 Get the list of tickets categories. More...
 
 getTicketsSeverities ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='')
 Get the list of tickets severity. More...
 
 getTicketsTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='')
 Get the list of tickets types. More...
 
 getCheckIntegrity ($target)
 Do a test of integrity for files and setup. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor. More...
 
 _cleanObjectDatas ($object)
 Executed method when API is called without parameter. More...
 
 _checkFilters ($sqlfilters)
 Return if a $sqlfilters parameter is valid. More...
 

Private Member Functions

 translateLabel ($country, $lang)
 Translate the name of the country to the given language. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DolibarrApi
static _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
 Check user access to a resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria. More...
 

Detailed Description

Definition at line 34 of file api_setup.class.php.

Member Function Documentation

◆ _cleanObjectDatas()

Setup::_cleanObjectDatas (   $object)

Clean sensible object datas.

Parameters
object$objectObject to clean
Returns
array Array of cleaned object properties

Definition at line 282 of file api_setup.class.php.

◆ getAvailability()

Setup::getAvailability (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $active = 1,
  $sqlfilters = '' 
)

Get the list of delivery times.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number { 0}
int$activeDelivery times is active or not { 0} { 1}
string$sqlfiltersSQL criteria to filter with.

GET dictionary/availability

Returns
array [List of availability]
Exceptions
400RestException
200OK

Definition at line 231 of file api_setup.class.php.

◆ getCheckIntegrity()

Setup::getCheckIntegrity (   $target)

Do a test of integrity for files and setup.

Parameters
string$targetCan be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr.
Returns
Result of file and setup integrity check

GET checkintegrity

Exceptions
RestException

Definition at line 835 of file api_setup.class.php.

◆ getCountryByID()

Setup::getCountryByID (   $id,
  $lang = '' 
)

Get country by ID.

Parameters
int$idID of country
string$langCode of the language the name of the country must be translated to
Returns
array Array of cleaned object properties

GET dictionary/countries/{id}

Exceptions
RestException

Definition at line 198 of file api_setup.class.php.

◆ getListOfCivility()

Setup::getListOfCivility (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $module = '',
  $sqlfilters = '' 
)

Get the list of civility.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$moduleTo filter on module events
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
List of events types

GET dictionary/civility

Exceptions
RestException

Definition at line 398 of file api_setup.class.php.

◆ getListOfCountries()

Setup::getListOfCountries (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $filter = '',
  $lang = '',
  $sqlfilters = '' 
)

Get the list of countries.

The names of the countries will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by country ID.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$filterTo filter the countries by name
string$langCode of the language the label of the countries must be translated to
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
array List of countries

GET dictionary/countries

Exceptions
RestException

Definition at line 131 of file api_setup.class.php.

◆ getListOfEventTypes()

Setup::getListOfEventTypes (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $type = '',
  $module = '',
  $sqlfilters = '' 
)

Get the list of events types.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$typeTo filter on type of event
string$moduleTo filter on module events
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
List of events types

GET dictionary/event_types

Exceptions
RestException

Definition at line 336 of file api_setup.class.php.

◆ getListOfExtrafields()

Setup::getListOfExtrafields (   $sortfield = "t.pos",
  $sortorder = 'ASC',
  $type = '',
  $sqlfilters = '' 
)

Get the list of extra fields.

Parameters
string$sortfieldSort field
string$sortorderSort order
string$typeType of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...)
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')"
Returns
List of extra fields

GET extrafields

Exceptions
RestException

Definition at line 457 of file api_setup.class.php.

◆ getListOfTowns()

Setup::getListOfTowns (   $sortfield = "zip,town",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $zipcode = '',
  $town = '',
  $sqlfilters = '' 
)

Get the list of towns.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$zipcodeTo filter on zipcode
string$townTo filter on city name
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
List of towns

GET dictionary/towns

Exceptions
RestException

Definition at line 535 of file api_setup.class.php.

◆ getPaymentTerms()

Setup::getPaymentTerms (   $sortfield = "sortorder",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $active = 1,
  $sqlfilters = '' 
)

Get the list of payments terms.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number { 0}
int$activePayment term is active or not { 0} { 1}
string$sqlfiltersSQL criteria to filter. Syntax example "(t.code:=:'CHQ')"

GET dictionary/payment_terms

Returns
array List of payment terms
Exceptions
400RestException
200OK

Definition at line 599 of file api_setup.class.php.

◆ getPaymentTypes()

Setup::getPaymentTypes (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $active = 1,
  $sqlfilters = '' 
)

Get the list of payments types.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number { 0}
int$activePayment type is active or not { 0} { 1}
string$sqlfiltersSQL criteria to filter with. Syntax example "(t.code:=:'CHQ')"

GET dictionary/payment_types

Returns
array [List of payment types]
Exceptions
400RestException
200OK

Definition at line 64 of file api_setup.class.php.

◆ getTicketsCategories()

Setup::getTicketsCategories (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

Get the list of tickets categories.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
List of events types

GET dictionary/ticket_categories

Exceptions
RestException

Definition at line 659 of file api_setup.class.php.

◆ getTicketsSeverities()

Setup::getTicketsSeverities (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

Get the list of tickets severity.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
List of events types

GET dictionary/ticket_severities

Exceptions
RestException

Definition at line 718 of file api_setup.class.php.

◆ getTicketsTypes()

Setup::getTicketsTypes (   $sortfield = "code",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

Get the list of tickets types.

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitNumber of items per page
int$pagePage number (starting from zero)
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
Returns
List of events types

GET dictionary/ticket_types

Exceptions
RestException

Definition at line 777 of file api_setup.class.php.

◆ translateLabel()

Setup::translateLabel (   $country,
  $lang 
)
private

Translate the name of the country to the given language.

Parameters
Ccountry$countryCountry
string$langCode of the language the name of the country must be translated to
Returns
void

Definition at line 300 of file api_setup.class.php.


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