Function Hook_import_cms_merge->_import_upload
Definitions
sources/hooks/modules/admin_import/cms_merge.php
- Import an uploaded file from the old site to the new one.This should be called on every URLPATH db field which could contain an uploaded file. For multi fields, this should be called on every line of the field.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | ?URLPATH | No | No | required parameter | N/A | N/A | The contents of one line of the URLPATH db field / a path relative to the upload file (null: none) |
| $file_base | PATH | No | No | required parameter | N/A | N/A | The base directory we are importing from |
Returns
- Whether to treat as successful
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Import an uploaded file from the old site to the new one.This should be called on every URLPATH db field which could contain an uploaded file. For multi fields, this should be called on every line of the field.
*
* @param ?URLPATH $path The contents of one line of the URLPATH db field / a path relative to the upload file (null: none)
* @param PATH $file_base The base directory we are importing from
* @return boolean Whether to treat as successful
*/
protected function _import_upload(?string $path, string $file_base) : bool
* Import an uploaded file from the old site to the new one.This should be called on every URLPATH db field which could contain an uploaded file. For multi fields, this should be called on every line of the field.
*
* @param ?URLPATH $path The contents of one line of the URLPATH db field / a path relative to the upload file (null: none)
* @param PATH $file_base The base directory we are importing from
* @return boolean Whether to treat as successful
*/
protected function _import_upload(?string $path, string $file_base) : bool

