modules/Administration/updater_utils.php
Functions
check_now(
$send_usage_info
=
true, $get_request_data
=
false, $response_data
=
false, $from_install
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $send_usage_info | ||
| $get_request_data | ||
| $response_data | ||
| $from_install |
getBaseSystemInfo(
$send_usage_info
=
true
)
:
void| Name | Type | Description |
|---|---|---|
| $send_usage_info |
getModuleWhiteListForLicenseCheck(
\User $user
)
:
arrayWhitelist of modules and actions that don't need redirect
Use following standard for whitelist: array( 'module_name_1' => array('action_name_1', 'action_name_2', ...), // Allow only "action_name_1" and "action_name_2" for "module_name_1" 'module_name_2' => 'all', | // Allow ALL actions in module "module_name_2" ... )
| Name | Type | Description |
|---|---|---|
| $user | \User |
| Type | Description |
|---|---|
| array |
isAboutToExpire(
$expire_date, $days_before_warning
=
7
)
:
void| Name | Type | Description |
|---|---|---|
| $expire_date | ||
| $days_before_warning |
isNeedRedirectDependingOnUserAndSystemState(
string $state, string $module
=
null, string $action
=
null, $whiteList
=
array()
)
:
booleanCheck if $module and $action don't get into whitelist and do we need redirect
| Name | Type | Description |
|---|---|---|
| $state | string | Now works only for 'LICENSE_KEY' state (TODO: do we need any other state?) |
| $module | string | Module to check |
| $action | string | (optional) Action to check. Can be omitted because some modules include all actions |
| $whiteList |
| Type | Description |
|---|---|
| boolean |
setSystemState(
string $state
)
:
voidRedirect current user if current module and action isn't in whitelist
| Name | Type | Description |
|---|---|---|
| $state | string | Now works only for 'LICENSE_KEY' state (TODO: do we need any other state?) |
- Global
- User $current_user User object that stores current application user