Documentation

GetList

Description and parameters

CDBResult
СCatalogImport::GetList(
  array arOrder = array("ID"=>"ASC"),
  array arFilter = array(),
  bool bCount = false
);

Returns list of import profiles by arFilter, sorted according to arOrder. Non-static method.

Call parameters

Parameter Description
arOrder Array for sorting resulting records. Array looks as follows:
array(
"field_name1" => "sort_direction1",
"field_name2" => "sort_direction2",
. . .
)
The "field_nameN" can use the following:
  • NAME - import profile name;
  • FILE_NAME - profile file name with script to perform import;
  • DEFAULT_PROFILE - [Y|N] attribute to use profile by default;
  • IN_MENU - [Y|N] flag for showing profile in admin menu;
  • LAST_USE - date and time of last profile execution in database format;
  • IN_AGENT - [Y|N] flag for available agent, performing profile import;
  • IN_CRON - [Y|N] flag for associating the profile to cron utility for automatic periodic upload (for Unix systems only);
  • NEED_EDIT - [Y|N] flag specifies incomplete profile setup (profile is not executed until its edited).
Attempt to sort by the rest of profile fields leads to sorting by ID.

The "sort_directionX" can have values "ASC" (by ascension) and "DESC" (by descension).

In case sorting array has several elements, the resulting set is sorted sequentially by each element (i. e. sorts by first element, then sorts by second and etc.).
arFilter Array to filter import profile records. Looks as follows:
array(
"[modifier]field_name1" => "value1",
"[modifier]field_name2" => "value2",
. . .
)
Records satisfying the filter are returned in the result and records that doesn't, are not.

The following modifier is permitted:
  • ! - negation;
The "field_nameX" can have any import profile field, except SETUP_VARS, TIMESTAMP_X and DATE_CREATE.
bCount In case parameter is true, returns only the number of profiles that correspond to specified filter. Optional. By default, set to false.

Returned value

Returns CDBResult class object, containing collection of associative arrays with keys:

  • ID - record code;
  • FILE_NAME - profile file name with script to perform import;
  • NAME - import profile name;
  • IN_MENU - [Y|N] flag for showing profile in admin menu;
  • IN_AGENT - [Y|N] flag for available agent, performing profile import;
  • IN_CRON - [Y|N] flag for associating the profile to cron utility for automatic periodic upload (for Unix systems only);
  • SETUP_VARS - profile setup parameters as URL string;
  • DEFAULT_PROFILE - [Y|N] attribute to use profile by default;
  • LAST_USE - date and time of last profile execution in database format;
  • NEED_EDIT - [Y|N] flag specifies incomplete profile setup (profile is not executed until its edited).
  • LAST_USE_FORMAT - date and time of last profile use in site format;
  • CREATED_BY - user profile ID;
  • MODIFIED_BY - user ID who updated profile;
  • TIMESTAMP_X - time of the last profile update in site format;
  • DATE_CREATE - date and time of created profile in site format.

© «Bitrix24», 2001-2024