class IM

Class IM

Traits

Static Cache Trait Adds a static (per request) cache to the object which can hold data for the time of the request (in the frontend) or a certain duration during long running processes. It works together with the global caching system and enforces a static cache clearing in case of global cache clearings as well.

Methods

add_global_group_context_exclude(array $global_group_excludes = array())

Add Instances which should be ignored when applying global group context

add_include_path($include_paths)

No description

array
get_changed_files(string $module_name = '*')

Returns all changed files from modules and system.

Core|bool
get_default_instance(string $module)

returns the default instance of the given module or false if no default is available To set a default insert order in insance:registry in fields sort_for_default -> as long there is null, no default is returned

int
get_global_group_context(string $instance_id = false)

returns global group context if set

get_global_group_parent_context(string|bool $instance_id = false)

returns global group parent context reference [Core] (if set). false if not set

get_hook_instances($hook_name, $create_obj = true)

No description

Core|false
get_instance(string $instance_id, string|bool $instance_copy_id = false, bool $force_new = false, Core|bool $parent_context = false, int|bool $group_context = false, int $groupSecurityId = 0)

No description

bool|mixed
get_instance_list(string|bool $mod = false)

Returns an array of all available instances

array
get_instance_meta(string $instance_id)

No description

get_instance_reference($calling_instance, $object_id, $instance_copy_id = false, $module_name = false)

Retrieve an Object Reference from the "lib-array"

Core|false
get_mod_instance(string $module_name, string $instance_id = null, string|bool $instance_copy_id = false, bool $no_existing_check_for_install = false, bool $force_new = false, Core|bool $parent_context = false, string|bool $group_context = false)

No description

get_mod_instance_list($module_name)

No description

string
get_module_icon(string $module_name, int $size = 16, string $vendor = null)

No description

array
get_module_meta($module_name)

No description

string|false
get_module_name_for_instance(string $instance_id, string $type = 'module', bool $skip_checks = false, int $group_context = false, int $groupSecurityId = 0)

Search and return Module Name Returns false if current user has no access rights for passed instance, otherwise the name of the module is returned

array
get_related_instances(string $instance_id)

Returns all related instances(grand parent, parent, children and siblings)

bool
instance_exists(string|int $instance_id, string $module_name = null)

No description

bool
module_exists($module, $vendor = false)

No description

reload()

Resets the local cache and forces IM to reload instance data for the next call

rename_instance(string $current_instance_id, string $new_instance_id = '')

Renames the alphanumerical instance ID of an instance. Helper can only be renamed to the module name.

string|int
resolve_instance_id(mixed $instance_id, string $output = 'auto')

Resolve numeric instance_id to string representation or vice versa

void
set_global_group_context(int $context, Core|bool $parent_context = false)

Set the global parent context which will be used for each new instance (e.g. get_instance())

set_global_group_context_exclude(array $global_group_excludes = array())

Set Instances which should be ignored when applying global group context

set_instance_reference(mixed $calling_instance, mixed $object_id, mixed $object, mixed $instance_copy_id = false)

Set Instance Reference

mixed
shellplugin_is_installed(string $plugin_id)

Checks if a certain shellplugin is available on this system

static void
static void
staticCacheClearCachePool($cache_pool = 'default')

Clears the specified cache pool from the static cache

static array|string|int|bool|null
staticCacheGet($key, string $cache_pool = 'default')

Retrieves a value from the static cache

static array
staticCacheGetKeys(string $cache_pool = 'default')

Returns an array of all cache keys which have been set

static array
staticCacheGetPool($cache_pool)

Returns an key/value array with all cached values from the passed pool

static bool
staticCacheIsEnabled()

No description

static bool
staticCacheIsSet($key, string $cache_pool = 'default')

Checks if the passed is key has a value set

static 
staticCacheRemove($key, string $cache_pool = 'default')

Removes the passed key

static void
staticCacheSet(string|int $key, mixed $value, string $cache_pool = 'default')

Store a value in the static cache

Details

at line 258
add_global_group_context_exclude(array $global_group_excludes = array())

Add Instances which should be ignored when applying global group context

Parameters

array $global_group_excludes

List of Instance IDs

at line 511
add_include_path($include_paths)

No description

Parameters

$include_paths

at line 1082
array get_changed_files(string $module_name = '*')

Returns all changed files from modules and system.

To determine changes, the file_check_list.yml is used that located in each setup folder of modules and system. This file contains all necessary files with related checksum. A comparison of the local file checksum with the checksum of the file list determines if the file is changed of not.

Parameters

string $module_name

[optional] The name of a specific module or system.

Return Value

array

Returns an array contains all changed files. The key is the module name or system and the value contains an other array with all changed files.

at line 754
Core|bool get_default_instance(string $module)

returns the default instance of the given module or false if no default is available To set a default insert order in insance:registry in fields sort_for_default -> as long there is null, no default is returned

Parameters

string $module

Return Value

Core|bool

at line 201
int get_global_group_context(string $instance_id = false)

returns global group context if set

Parameters

string $instance_id

Return Value

int

at line 184
Core get_global_group_parent_context(string|bool $instance_id = false)

returns global group parent context reference [Core] (if set). false if not set

Parameters

string|bool $instance_id

Instance ID (needed to check wether instance is part of the exclude group or not)

Return Value

Core

at line 48
get_hook_instances($hook_name, $create_obj = true)

No description

Parameters

$hook_name
$create_obj

at line 223
Core|false get_instance(string $instance_id, string|bool $instance_copy_id = false, bool $force_new = false, Core|bool $parent_context = false, int|bool $group_context = false, int $groupSecurityId = 0)

No description

Parameters

string $instance_id

Instance ID

string|bool $instance_copy_id

instance copy id

bool $force_new

Force New Object

Core|bool $parent_context

parent_context

int|bool $group_context

group_context

int $groupSecurityId

Return Value

Core|false

at line 109
bool|mixed get_instance_list(string|bool $mod = false)

Returns an array of all available instances

Parameters

string|bool $mod

Pass module name to limit result to a certain module

Return Value

bool|mixed

at line 658
array get_instance_meta(string $instance_id)

No description

Parameters

string $instance_id

Instance ID

Return Value

array

Meta Info with title, description, icon_16, icon_32, icon_64

at line 473
Core get_instance_reference($calling_instance, $object_id, $instance_copy_id = false, $module_name = false)

Retrieve an Object Reference from the "lib-array"

Parameters

$calling_instance
$object_id
$instance_copy_id
$module_name

Return Value

Core

at line 278
Core|false get_mod_instance(string $module_name, string $instance_id = null, string|bool $instance_copy_id = false, bool $no_existing_check_for_install = false, bool $force_new = false, Core|bool $parent_context = false, string|bool $group_context = false)

No description

Parameters

string $module_name

Module ID

string $instance_id

Instance ID

string|bool $instance_copy_id

instance copy id

bool $no_existing_check_for_install

set true if you don't want to check if instance exists. Needed for installing new instances

bool $force_new

Set to true to disable caching for this call and create a new object

Core|bool $parent_context

parent_context

string|bool $group_context

group_context

Return Value

Core|false

at line 87
get_mod_instance_list($module_name)

No description

Parameters

$module_name

at line 529
string get_module_icon(string $module_name, int $size = 16, string $vendor = null)

No description

Parameters

string $module_name

Module Name (e.g. eventplanner)

int $size

Size of the icon (16,32 or 64 | use false to get icon path only)

string $vendor

Return Value

string

at line 594
array get_module_meta($module_name)

No description

Parameters

$module_name

Return Value

array

at line 698
string|false get_module_name_for_instance(string $instance_id, string $type = 'module', bool $skip_checks = false, int $group_context = false, int $groupSecurityId = 0)

Search and return Module Name Returns false if current user has no access rights for passed instance, otherwise the name of the module is returned

Parameters

string $instance_id
string $type
bool $skip_checks

ignores active flag in registry and page access rights

int $group_context
int $groupSecurityId

Return Value

string|false

Returns all related instances(grand parent, parent, children and siblings)

Parameters

string $instance_id

Return Value

array

of instance ids

at line 146
bool instance_exists(string|int $instance_id, string $module_name = null)

No description

Parameters

string|int $instance_id

Instance ID

string $module_name

Return Value

bool

at line 164
bool module_exists($module, $vendor = false)

No description

Parameters

$module
$vendor

Return Value

bool

true if exists

at line 1119
reload()

Resets the local cache and forces IM to reload instance data for the next call

at line 921
rename_instance(string $current_instance_id, string $new_instance_id = '')

Renames the alphanumerical instance ID of an instance. Helper can only be renamed to the module name.

Performs checks and updates the system tables and tables of other instances(e.g. search, workflows).

Parameters

string $current_instance_id

current instance ID

string $new_instance_id

The new instance id is not needed for renaming helpers.

at line 635
string|int resolve_instance_id(mixed $instance_id, string $output = 'auto')

Resolve numeric instance_id to string representation or vice versa

Parameters

mixed $instance_id
string $output

auto, string, id

Return Value

string|int

$instance_id

at line 239
void set_global_group_context(int $context, Core|bool $parent_context = false)

Set the global parent context which will be used for each new instance (e.g. get_instance())

Parameters

int $context

GroupContext (ID)

Core|bool $parent_context

ParentContext (parent instance object)

Return Value

void

at line 250
set_global_group_context_exclude(array $global_group_excludes = array())

Set Instances which should be ignored when applying global group context

Parameters

array $global_group_excludes

List of Instance IDs

at line 498
set_instance_reference(mixed $calling_instance, mixed $object_id, mixed $object, mixed $instance_copy_id = false)

Set Instance Reference

Parameters

mixed $calling_instance
mixed $object_id
mixed $object
mixed $instance_copy_id

at line 842
mixed shellplugin_is_installed(string $plugin_id)

Checks if a certain shellplugin is available on this system

Parameters

string $plugin_id

ID of the plugin, e.g. "pear:dta" or "shell:tar"

Return Value

mixed

Returns an array with additional information if available, otherwise FALSE

in StaticCacheTrait at line 121
static void staticCacheClearAllCachePools()

No description

Return Value

void

in StaticCacheTrait at line 114
static void staticCacheClearCachePool($cache_pool = 'default')

Clears the specified cache pool from the static cache

Parameters

$cache_pool

Return Value

void

in StaticCacheTrait at line 61
static array|string|int|bool|null staticCacheGet($key, string $cache_pool = 'default')

Retrieves a value from the static cache

Parameters

$key
string $cache_pool

Return Value

array|string|int|bool|null

Returns the cached result or null if no value has been stored

in StaticCacheTrait at line 98
static array staticCacheGetKeys(string $cache_pool = 'default')

Returns an array of all cache keys which have been set

Parameters

string $cache_pool

Return Value

array

in StaticCacheTrait at line 107
static array staticCacheGetPool($cache_pool)

Returns an key/value array with all cached values from the passed pool

Parameters

$cache_pool

Return Value

array

in StaticCacheTrait at line 34
static bool staticCacheIsEnabled()

No description

Return Value

bool

in StaticCacheTrait at line 85
static bool staticCacheIsSet($key, string $cache_pool = 'default')

Checks if the passed is key has a value set

Parameters

$key
string $cache_pool

Return Value

bool

in StaticCacheTrait at line 73
static staticCacheRemove($key, string $cache_pool = 'default')

Removes the passed key

Parameters

$key
string $cache_pool

in StaticCacheTrait at line 46
static void staticCacheSet(string|int $key, mixed $value, string $cache_pool = 'default')

Store a value in the static cache

Parameters

string|int $key
mixed $value
string $cache_pool

ID for the cache pool which should be used

Return Value

void