migration_functions.php
Table of Contents
Functions
- migrate_resource_type_field_check() : mixed
- migrate_category_tree_to_nodes() : mixed
- migrate_filter() : mixed
- random_char() : string
- Utility function to generate a random UTF8 character
- mix_date() : string
- Utility function to randomly alter date by offset
- mix_text() : string
- Utility function to randomly scramble string
- alter_data() : void
- Utility function to randomly scramble data array for exporting
- mix_url() : string
- Utility function to scramble a URL
- mix_filename() : string
- Utility function to scramble a filename
- mix_email() : string
- Utility function to scramble an email address
- safe_export() : string
- Utility function to escape and replace any empty strings with NULLS for exported SQL scripts
- get_export_tables() : array<string|int, mixed>
- Get array of tables to export when exporting system config and data
- edit_filter_to_restype_permission() : mixed
Functions
migrate_resource_type_field_check()
migrate_resource_type_field_check(mixed &$resource_type_field) : mixed
Parameters
- $resource_type_field : mixed
migrate_category_tree_to_nodes()
migrate_category_tree_to_nodes(mixed $resource_type_field_ref, mixed $category_tree_options) : mixed
Parameters
- $resource_type_field_ref : mixed
- $category_tree_options : mixed
migrate_filter()
migrate_filter(mixed $filtertext[, mixed $allowpartialmigration = false ]) : mixed
Parameters
- $filtertext : mixed
- $allowpartialmigration : mixed = false
random_char()
Utility function to generate a random UTF8 character
random_char() : string
Return values
stringmix_date()
Utility function to randomly alter date by offset
mix_date(string $fromdate[, int $maxoffset = 30 ]) : string
Parameters
- $fromdate : string
-
- date string
- $maxoffset : int = 30
-
- Maximum number of days to offset
Return values
stringmix_text()
Utility function to randomly scramble string
mix_text(null|string $string[, bool $recurse = true ]) : string
Parameters
- $string : null|string
-
Text string to scramble
- $recurse : bool = true
-
Optionally prevent recursion (maybe called by another mix unction)
Return values
stringalter_data()
Utility function to randomly scramble data array for exporting
alter_data(array<string|int, mixed> &$row, mixed $key[, bool $scramblecolumns = array() ]) : void
Parameters
- $row : array<string|int, mixed>
-
- Array of data passed by reference
- $key : mixed
- $scramblecolumns : bool = array()
-
- Optional array of columns to scramble
mix_url()
Utility function to scramble a URL
mix_url(string $string) : string
Parameters
- $string : string
-
- URL to scramble
Return values
stringmix_filename()
Utility function to scramble a filename
mix_filename(string $string) : string
Parameters
- $string : string
-
- filename to scramble
Return values
stringmix_email()
Utility function to scramble an email address
mix_email(string $string) : string
Parameters
- $string : string
-
- email to scramble
Return values
stringsafe_export()
Utility function to escape and replace any empty strings with NULLS for exported SQL scripts
safe_export(null|string $value) : string
Parameters
- $value : null|string
-
Value to check
Return values
stringget_export_tables()
Get array of tables to export when exporting system config and data
get_export_tables([int $exportcollection = 0 ]) : array<string|int, mixed>
Parameters
- $exportcollection : int = 0
-
- Optional collection id to include resources and data from
Return values
array<string|int, mixed>edit_filter_to_restype_permission()
edit_filter_to_restype_permission(mixed $filtertext, mixed $usergroup, mixed $existingperms[, mixed $updatecurrent = false ]) : mixed
Parameters
- $filtertext : mixed
- $usergroup : mixed
- $existingperms : mixed
- $updatecurrent : mixed = false