Elgg
Version 2.3
|
Go to the source code of this file.
Functions | |
_elgg_generate_plugin_entities () | |
Discovers plugins in the plugins_path setting and creates entities for them if they don't exist. More... | |
_elgg_cache_plugin_by_id (\ElggPlugin $plugin) | |
Cache a reference to this plugin by its ID. More... | |
elgg_get_plugin_from_id ($plugin_id) | |
Returns an object with the path $path. More... | |
elgg_plugin_exists ($id) | |
Returns if a plugin exists in the system. More... | |
_elgg_get_max_plugin_priority () | |
Returns the highest priority of the plugins. More... | |
elgg_is_active_plugin ($plugin_id, $site_guid=null) | |
Returns if a plugin is active for a current site. More... | |
elgg_get_plugins ($status= 'active', $site_guid=null) | |
Returns an ordered list of plugins. More... | |
_elgg_namespace_plugin_private_setting ($type, $name, $id=null) | |
Namespaces a string to be used as a private setting name for a plugin. More... | |
_elgg_invalidate_plugins_provides_cache () | |
Deletes all cached data on plugins being provided. More... | |
_elgg_check_plugins_provides ($type, $name, $version=null, $comparison= 'ge') | |
Checks if a plugin is currently providing $type and $name, and optionally checking a version. More... | |
_elgg_get_plugin_dependency_strings ($dep) | |
Returns an array of parsed strings for a dependency in the format: array( 'type' => requires, conflicts, or provides. More... | |
elgg_get_all_plugin_user_settings ($user_guid=0, $plugin_id=null, $return_obj=false) | |
Returns an array of all plugin user settings for a user. More... | |
elgg_set_plugin_user_setting ($name, $value, $user_guid=0, $plugin_id=null) | |
Set a user specific setting for a plugin. More... | |
elgg_unset_plugin_user_setting ($name, $user_guid=0, $plugin_id=null) | |
Unsets a user-specific plugin setting. More... | |
elgg_get_plugin_user_setting ($name, $user_guid=0, $plugin_id=null, $default=null) | |
Get a user specific setting for a plugin. More... | |
elgg_set_plugin_setting ($name, $value, $plugin_id=null) | |
Set a setting for a plugin. More... | |
elgg_get_plugin_setting ($name, $plugin_id=null, $default=null) | |
Get setting for a plugin. More... | |
elgg_unset_plugin_setting ($name, $plugin_id=null) | |
Unsets a plugin setting. More... | |
elgg_unset_all_plugin_settings ($plugin_id=null) | |
Unsets all plugin settings for a plugin. More... | |
elgg_get_entities_from_plugin_user_settings (array $options=array()) | |
Returns entities based upon plugin user settings. More... | |
_elgg_plugins_test ($hook, $type, $value, $params) | |
Runs unit tests for plugin API. More... | |
_elgg_plugins_init () | |
Initialize the plugin system. More... | |
Variables | |
const | ELGG_PLUGIN_INCLUDE_START 1 |
Tells ::start() to include the start.php file. More... | |
const | ELGG_PLUGIN_REGISTER_VIEWS 2 |
Tells ::start() to automatically register the plugin's views. More... | |
const | ELGG_PLUGIN_REGISTER_LANGUAGES 4 |
Tells ::start() to automatically register the plugin's languages. More... | |
const | ELGG_PLUGIN_REGISTER_CLASSES 8 |
Tells ::start() to automatically register the plugin's classes. More... | |
const | ELGG_PLUGIN_USER_SETTING_PREFIX 'plugin:user_setting:' |
Prefix for plugin setting names. More... | |
const | ELGG_PLUGIN_INTERNAL_PREFIX 'elgg:internal:' |
Internal settings prefix. More... | |
return | function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |
_elgg_cache_plugin_by_id | ( | \ElggPlugin | $plugin | ) |
Cache a reference to this plugin by its ID.
\ElggPlugin | $plugin | private |
Definition at line 71 of file plugins.php.
_elgg_check_plugins_provides | ( | $type, | |
$name, | |||
$version = null , |
|||
$comparison = 'ge' |
|||
) |
Checks if a plugin is currently providing $type and $name, and optionally checking a version.
string | $type | The type of the provide |
string | $name | The name of the provide |
string | $version | A version to check against |
string | $comparison | The comparison operator to use in version_compare() |
Definition at line 182 of file plugins.php.
_elgg_generate_plugin_entities | ( | ) |
Discovers plugins in the plugins_path setting and creates entities for them if they don't exist.
If there are plugins with entities but not actual files, will disable the entities and mark as inactive. The object holds config data, so don't delete.
Definition at line 60 of file plugins.php.
_elgg_get_max_plugin_priority | ( | ) |
Returns the highest priority of the plugins.
Definition at line 108 of file plugins.php.
_elgg_get_plugin_dependency_strings | ( | $dep | ) |
Returns an array of parsed strings for a dependency in the format: array( 'type' => requires, conflicts, or provides.
'name' => The name of the requirement / conflict 'value' => A string representing the expected value: <1, >=3, !=enabled 'local_value' => The current value, ("Not installed") 'comment' => Free form text to help resovle the problem ("Enable / Search for plugin <link>") )
array | $dep | An dependency array |
Definition at line 201 of file plugins.php.
_elgg_invalidate_plugins_provides_cache | ( | ) |
Deletes all cached data on plugins being provided.
Definition at line 162 of file plugins.php.
_elgg_namespace_plugin_private_setting | ( | $type, | |
$name, | |||
$id = null |
|||
) |
Namespaces a string to be used as a private setting name for a plugin.
For user_settings, two namespaces are added: a user setting namespace and the plugin id.
For internal (plugin priority), there is a single internal namespace added.
string | $type | The type of setting: user_setting or internal. |
string | $name | The name to namespace. |
string | $id | The plugin's ID to namespace with. Required for user_setting. |
Definition at line 151 of file plugins.php.
_elgg_plugins_init | ( | ) |
Initialize the plugin system.
Definition at line 379 of file plugins.php.
_elgg_plugins_test | ( | $hook, | |
$type, | |||
$value, | |||
$params | |||
) |
Runs unit tests for plugin API.
string | $hook | unit_test |
string | $type | system |
mixed | $value | Array of tests |
mixed | $params | Params |
Definition at line 367 of file plugins.php.
elgg_get_all_plugin_user_settings | ( | $user_guid = 0 , |
|
$plugin_id = null , |
|||
$return_obj = false |
|||
) |
Returns an array of all plugin user settings for a user.
int | $user_guid | The user GUID or 0 for the currently logged in user. |
string | $plugin_id | The plugin ID (Required) |
bool | $return_obj | Return settings as an object? This can be used to in reusable views where the settings are passed as $vars['entity']. |
Definition at line 216 of file plugins.php.
elgg_get_entities_from_plugin_user_settings | ( | array | $options = array() | ) |
Returns entities based upon plugin user settings.
Takes all the options for elgg_get_entities_from_private_settings() in addition to the ones below.
array | $options | Array in the format: plugin_id => STR The plugin id. Required. plugin_user_setting_names => null|ARR private setting names plugin_user_setting_values => null|ARR metadata values plugin_user_setting_name_value_pairs => null|ARR ( name => 'name', value => 'value', 'operand' => '=', ) Currently if multiple values are sent via an array (value => array('value1', 'value2') the pair's operand will be forced to "IN". plugin_user_setting_name_value_pairs_operator => null|STR The operator to use for combining (name = value) OPERATOR (name = value); default AND |
Definition at line 352 of file plugins.php.
elgg_get_plugin_from_id | ( | $plugin_id | ) |
Returns an object with the path $path.
string | $plugin_id | The id (dir name) of the plugin. NOT the guid. |
Definition at line 82 of file plugins.php.
elgg_get_plugin_setting | ( | $name, | |
$plugin_id = null , |
|||
$default = null |
|||
) |
Get setting for a plugin.
string | $name | The name of the setting. |
string | $plugin_id | The plugin ID (Required) |
mixed | $default | The default value to return if none is set |
Definition at line 293 of file plugins.php.
elgg_get_plugin_user_setting | ( | $name, | |
$user_guid = 0 , |
|||
$plugin_id = null , |
|||
$default = null |
|||
) |
Get a user specific setting for a plugin.
string | $name | The name of the setting. |
int | $user_guid | The user GUID or 0 for the currently logged in user. |
string | $plugin_id | The plugin ID (Required) |
mixed | $default | The default value to return if none is set |
Definition at line 263 of file plugins.php.
elgg_get_plugins | ( | $status = 'active' , |
|
$site_guid = null |
|||
) |
Returns an ordered list of plugins.
string | $status | The status of the plugins. active, inactive, or all. |
mixed | $site_guid | Optional site guid |
Definition at line 132 of file plugins.php.
elgg_is_active_plugin | ( | $plugin_id, | |
$site_guid = null |
|||
) |
Returns if a plugin is active for a current site.
string | $plugin_id | The plugin ID |
int | $site_guid | The site guid |
Definition at line 120 of file plugins.php.
elgg_plugin_exists | ( | $id | ) |
Returns if a plugin exists in the system.
string | $id | The plugin ID. |
Definition at line 97 of file plugins.php.
elgg_set_plugin_setting | ( | $name, | |
$value, | |||
$plugin_id = null |
|||
) |
Set a setting for a plugin.
string | $name | The name of the setting - note, can't be "title". |
mixed | $value | The value. |
string | $plugin_id | The plugin ID (Required) |
Definition at line 278 of file plugins.php.
elgg_set_plugin_user_setting | ( | $name, | |
$value, | |||
$user_guid = 0 , |
|||
$plugin_id = null |
|||
) |
Set a user specific setting for a plugin.
string | $name | The name. Note: cannot be "title". |
mixed | $value | The value. |
int | $user_guid | The user GUID or 0 for the currently logged in user. |
string | $plugin_id | The plugin ID (Required) |
Definition at line 232 of file plugins.php.
elgg_unset_all_plugin_settings | ( | $plugin_id = null | ) |
Unsets all plugin settings for a plugin.
string | $plugin_id | The plugin ID (Required) |
Definition at line 320 of file plugins.php.
elgg_unset_plugin_setting | ( | $name, | |
$plugin_id = null |
|||
) |
Unsets a plugin setting.
string | $name | The name of the setting. |
string | $plugin_id | The plugin ID (Required) |
Definition at line 307 of file plugins.php.
elgg_unset_plugin_user_setting | ( | $name, | |
$user_guid = 0 , |
|||
$plugin_id = null |
|||
) |
Unsets a user-specific plugin setting.
string | $name | Name of the setting |
int | $user_guid | The user GUID or 0 for the currently logged in user. |
string | $plugin_id | The plugin ID (Required) |
Definition at line 247 of file plugins.php.
const ELGG_PLUGIN_INCLUDE_START 1 |
Tells ::start() to include the start.php file.
Definition at line 13 of file plugins.php.
const ELGG_PLUGIN_INTERNAL_PREFIX 'elgg:internal:' |
Internal settings prefix.
Definition at line 48 of file plugins.php.
const ELGG_PLUGIN_REGISTER_CLASSES 8 |
Tells ::start() to automatically register the plugin's classes.
Definition at line 28 of file plugins.php.
const ELGG_PLUGIN_REGISTER_LANGUAGES 4 |
Tells ::start() to automatically register the plugin's languages.
Definition at line 23 of file plugins.php.
const ELGG_PLUGIN_REGISTER_VIEWS 2 |
Tells ::start() to automatically register the plugin's views.
Definition at line 18 of file plugins.php.
const ELGG_PLUGIN_USER_SETTING_PREFIX 'plugin:user_setting:' |
Prefix for plugin setting names.
Prefix for plugin user setting names
Definition at line 41 of file plugins.php.
return function(\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |
Definition at line 406 of file plugins.php.