Function __global->import_id_remap_get
Definitions
sources/import.php
- Returns the NEW ID of an imported old ID, for the specified importation type. Whether it returns null or gives an error message depends on $fail_ok.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type | ID_TEXT | No | No | required parameter | N/A | N/A | An importation type code, from those the software has defined (E.g. 'download', 'news', ...) |
| $id_old | string | No | No | required parameter | N/A | N/A | The source (old, original) ID of the mapping |
| $fail_ok | boolean | No | No | False | N/A | N/A | If it is okay to fail to find a mapping |
Returns
- The new ID (null: not imported yet, or not found) (0: N/A) (-1: flagged as error and not imported)
- Type: ?AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Returns the NEW ID of an imported old ID, for the specified importation type. Whether it returns null or gives an error message depends on $fail_ok.
*
* @param ID_TEXT $type An importation type code, from those the software has defined (E.g. 'download', 'news', ...)
* @param string $id_old The source (old, original) ID of the mapping
* @param boolean $fail_ok If it is okay to fail to find a mapping
* @return ?AUTO_LINK The new ID (null: not imported yet, or not found) (0: N/A) (-1: flagged as error and not imported)
*/
function import_id_remap_get(string $type, string $id_old, bool $fail_ok = false) : ?int
* Returns the NEW ID of an imported old ID, for the specified importation type. Whether it returns null or gives an error message depends on $fail_ok.
*
* @param ID_TEXT $type An importation type code, from those the software has defined (E.g. 'download', 'news', ...)
* @param string $id_old The source (old, original) ID of the mapping
* @param boolean $fail_ok If it is okay to fail to find a mapping
* @return ?AUTO_LINK The new ID (null: not imported yet, or not found) (0: N/A) (-1: flagged as error and not imported)
*/
function import_id_remap_get(string $type, string $id_old, bool $fail_ok = false) : ?int

