Elgg
Version 4.3
|
Persistent, installation-wide key-value storage. More...
Public Member Functions | |
__construct (\ElggCache $cache, Database $db,\ElggSession $session, EventsService $events, Translator $translator, ViewsService $views, PrivateSettingsCache $private_settings_cache, Config $config, SystemMessagesService $system_messages, Request $request) | |
Constructor. More... | |
getPath () | |
Get the plugin path for this installation, ending with slash. More... | |
setBootPlugins ($plugins, $order_plugins=true) | |
Set the list of active plugins according to the boot data cache. More... | |
clear () | |
Clear plugin caches. More... | |
invalidate () | |
Invalidate plugin cache. More... | |
getDirsInDir ($dir=null) | |
Returns a list of plugin directory names from a base directory. More... | |
generateEntities () | |
Discovers plugins in the plugins_path setting and creates entities for them if they don't exist. More... | |
cache (\ElggPlugin $plugin) | |
Cache a reference to this plugin by its ID. More... | |
invalidateCache ($plugin_id) | |
Remove plugin from cache. More... | |
get (string $plugin_id) | |
Returns an object with the path $path. More... | |
exists (string $id) | |
Returns if a plugin exists in the system. More... | |
getMaxPriority () | |
Returns the highest priority of the plugins. More... | |
isActive (string $plugin_id) | |
Returns if a plugin is active for a current site. More... | |
build () | |
Registers lifecycle hooks for all active plugins sorted by their priority. More... | |
register () | |
Autoload plugin classes and files Register views, translations and custom entity types. More... | |
boot () | |
Boot the plugins. More... | |
init () | |
Initialize plugins. More... | |
ready () | |
Run plugin ready handlers. More... | |
upgrade () | |
Run plugin upgrade handlers. More... | |
shutdown () | |
Run plugin shutdown handlers. More... | |
find (string $status= 'active') | |
Returns an ordered list of plugins. More... | |
setPriorities (array $order) | |
Reorder plugins to an order specified by the array. More... | |
reindexPriorities () | |
Reindexes all plugin priorities starting at 1. More... | |
setPriority (\ElggPlugin $plugin, $priority) | |
Set plugin priority and adjust the priorities of other plugins. More... | |
Public Attributes | |
const | BUNDLED_PLUGINS |
Protected Member Functions | |
disable (\ElggPlugin $plugin,\Exception $previous) | |
Disable a plugin upon exception. More... | |
orderPluginsByPriority ($plugins=[], $volatile_data_name=null) | |
Sorts plugins by priority. More... | |
Protected Attributes | |
$boot_plugins | |
$db | |
$session | |
$events | |
$translator | |
$views | |
$private_settings_cache | |
$config | |
$system_messages | |
$context | |
Persistent, installation-wide key-value storage.
Definition at line 28 of file Plugins.php.
Elgg\Database\Plugins::__construct | ( | \ElggCache | $cache, |
Database | $db, | ||
\ElggSession | $session, | ||
EventsService | $events, | ||
Translator | $translator, | ||
ViewsService | $views, | ||
PrivateSettingsCache | $private_settings_cache, | ||
Config | $config, | ||
SystemMessagesService | $system_messages, | ||
Request | $request | ||
) |
Constructor.
\ElggCache | $cache | Cache for referencing plugins by ID |
Database | $db | Database |
\ElggSession | $session | Session |
EventsService | $events | Events |
Translator | $translator | Translator |
ViewsService | $views | Views service |
PrivateSettingsCache | $private_settings_cache | Settings cache |
Config | $config | Config |
SystemMessagesService | $system_messages | System messages |
Request | $request | Context |
Definition at line 133 of file Plugins.php.
Elgg\Database\Plugins::boot | ( | ) |
Boot the plugins.
plugins_boot:before system
Definition at line 572 of file Plugins.php.
Elgg\Database\Plugins::build | ( | ) |
Registers lifecycle hooks for all active plugins sorted by their priority.
Definition at line 516 of file Plugins.php.
Elgg\Database\Plugins::cache | ( | \ElggPlugin | $plugin | ) |
Cache a reference to this plugin by its ID.
\ElggPlugin | $plugin | the plugin to cache |
Definition at line 390 of file Plugins.php.
Elgg\Database\Plugins::clear | ( | ) |
|
protected |
Disable a plugin upon exception.
\ElggPlugin | $plugin | Plugin entity to disable |
\Exception | $previous | Exception thrown |
Definition at line 699 of file Plugins.php.
Elgg\Database\Plugins::exists | ( | string | $id | ) |
Returns if a plugin exists in the system.
string | $id | The plugin ID. |
Definition at line 462 of file Plugins.php.
Elgg\Database\Plugins::find | ( | string | $status = 'active' | ) |
Returns an ordered list of plugins.
string | $status | The status of the plugins. active, inactive, or all. |
Definition at line 736 of file Plugins.php.
Elgg\Database\Plugins::generateEntities | ( | ) |
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 269 of file Plugins.php.
Elgg\Database\Plugins::get | ( | string | $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 421 of file Plugins.php.
Elgg\Database\Plugins::getDirsInDir | ( | $dir = null | ) |
Returns a list of plugin directory names from a base directory.
string | $dir | A dir to scan for plugins. Defaults to config's plugins_path. Must have a trailing slash. |
Definition at line 234 of file Plugins.php.
Elgg\Database\Plugins::getMaxPriority | ( | ) |
Elgg\Database\Plugins::getPath | ( | ) |
Get the plugin path for this installation, ending with slash.
Definition at line 163 of file Plugins.php.
Elgg\Database\Plugins::init | ( | ) |
Elgg\Database\Plugins::invalidate | ( | ) |
Elgg\Database\Plugins::invalidateCache | ( | $plugin_id | ) |
Remove plugin from cache.
string | $plugin_id | Plugin ID |
Definition at line 404 of file Plugins.php.
Elgg\Database\Plugins::isActive | ( | string | $plugin_id | ) |
Returns if a plugin is active for a current site.
string | $plugin_id | The plugin ID |
Definition at line 494 of file Plugins.php.
|
protected |
Elgg\Database\Plugins::ready | ( | ) |
Elgg\Database\Plugins::register | ( | ) |
Autoload plugin classes and files Register views, translations and custom entity types.
plugins_load system
Definition at line 546 of file Plugins.php.
Elgg\Database\Plugins::reindexPriorities | ( | ) |
Reindexes all plugin priorities starting at 1.
Definition at line 907 of file Plugins.php.
Elgg\Database\Plugins::setBootPlugins | ( | $plugins, | |
$order_plugins = true |
|||
) |
Set the list of active plugins according to the boot data cache.
Definition at line 179 of file Plugins.php.
Elgg\Database\Plugins::setPriorities | ( | array | $order | ) |
Reorder plugins to an order specified by the array.
Plugins not included in this array will be appended to the end.
array | $order | An array of plugin ids in the order to set them |
Definition at line 847 of file Plugins.php.
Elgg\Database\Plugins::setPriority | ( | \ElggPlugin | $plugin, |
$priority | |||
) |
Set plugin priority and adjust the priorities of other plugins.
\ElggPlugin | $plugin | Plugin |
int | $priority | New priority |
Definition at line 919 of file Plugins.php.
Elgg\Database\Plugins::shutdown | ( | ) |
Run plugin shutdown handlers.
shutdown system
Definition at line 672 of file Plugins.php.
Elgg\Database\Plugins::upgrade | ( | ) |
|
protected |
Definition at line 71 of file Plugins.php.
|
protected |
Definition at line 106 of file Plugins.php.
|
protected |
Definition at line 116 of file Plugins.php.
|
protected |
Definition at line 76 of file Plugins.php.
|
protected |
Definition at line 86 of file Plugins.php.
|
protected |
Definition at line 101 of file Plugins.php.
|
protected |
Definition at line 81 of file Plugins.php.
|
protected |
Definition at line 111 of file Plugins.php.
|
protected |
Definition at line 91 of file Plugins.php.
|
protected |
Definition at line 96 of file Plugins.php.
const Elgg\Database\Plugins::BUNDLED_PLUGINS |
Definition at line 34 of file Plugins.php.