Public Member Functions | |
| __construct ($plugin) | |
| Loads the plugin by GUID or path. | |
| save () | |
| Save the plugin object. | |
| getID () | |
| Returns the ID (dir name) of this plugin. | |
| getFriendlyName () | |
| Returns the manifest's name if available, otherwise the ID. | |
| getPath () | |
| Returns the plugin's full path with trailing slash. | |
| setID ($id) | |
| Sets the location of this plugin. | |
| getAvailableTextFiles () | |
| Returns an array of available markdown files for this plugin. | |
| getPriority () | |
| Gets the plugin's load priority. | |
| setPriority ($priority, $site_guid=null) | |
| Sets the priority of the plugin. | |
| getSetting ($name) | |
| Returns a plugin setting. | |
| getAllSettings () | |
| Returns an array of all settings saved for this plugin. | |
| setSetting ($name, $value) | |
| Set a plugin setting for the plugin. | |
| unsetSetting ($name) | |
| Removes a plugin setting name and value. | |
| unsetAllSettings () | |
| Removes all settings for this plugin. | |
| getUserSetting ($name, $user_guid=null) | |
| Returns a user's setting for this plugin. | |
| getAllUserSettings ($user_guid=null) | |
| Returns an array of all user settings saved for this plugin for the user. | |
| setUserSetting ($name, $value, $user_guid=null) | |
| Sets a user setting for a plugin. | |
| unsetUserSetting ($name, $user_guid=null) | |
| Removes a user setting name and value. | |
| unsetAllUserSettings ($user_guid) | |
| Removes all User Settings for this plugin. | |
| unsetAllUsersSettings () | |
| Removes this plugin's user settings for all users. | |
| isValid () | |
| Returns if the plugin is complete, meaning has all required files and Elgg can read them and they make sense. | |
| isActive ($site_guid=null) | |
| Is this plugin active? | |
| canActivate ($site_guid=null) | |
| Checks if this plugin can be activated on the current Elgg installation. | |
| activate ($site_guid=null) | |
| Actives the plugin for the current site. | |
| deactivate ($site_guid=null) | |
| Deactivates the plugin. | |
| start ($flags) | |
| Start the plugin. | |
| get ($name) | |
| Get a value from private settings. | |
| set ($name, $value) | |
| Save a value as private setting or attribute. | |
| getError () | |
| Returns the last error message registered. | |
| getManifest () | |
| Returns this plugin's ElggPluginManifest object. | |
| getPackage () | |
| Returns this plugin's ElggPluginPackage object. | |
Protected Member Functions | |
| initializeAttributes () | |
| Set subtype to 'plugin'. | |
| includeFile ($filename) | |
| Includes one of the plugins files. | |
| canReadFile ($filename) | |
| Checks whether a plugin file with the given name exists. | |
| registerViews () | |
| Registers the plugin's views. | |
| registerLanguages () | |
| Registers the plugin's languages. | |
| registerClasses () | |
| Registers the plugin's classes. | |
Definition at line 11 of file ElggPlugin.php.
| ElggPlugin::__construct | ( | $ | plugin | ) |
Loads the plugin by GUID or path.
| mixed | $plugin The GUID of the ElggPlugin object or the path of the plugin to load. |
| PluginException |
Reimplemented from ElggObject.
Definition at line 43 of file ElggPlugin.php.
| ElggPlugin::activate | ( | $ | site_guid = null |
) |
Actives the plugin for the current site.
| mixed | $site_guid Optional site GUID. |
Definition at line 627 of file ElggPlugin.php.
| ElggPlugin::canActivate | ( | $ | site_guid = null |
) |
Checks if this plugin can be activated on the current Elgg installation.
| mixed | $site_guid Optional site guid |
Definition at line 605 of file ElggPlugin.php.
| ElggPlugin::canReadFile | ( | $ | filename | ) | [protected] |
Checks whether a plugin file with the given name exists.
| string | $filename The name of the file |
Definition at line 774 of file ElggPlugin.php.
| ElggPlugin::deactivate | ( | $ | site_guid = null |
) |
Deactivates the plugin.
| mixed | $site_guid Optional site GUID. |
Definition at line 677 of file ElggPlugin.php.
| ElggPlugin::get | ( | $ | name | ) |
Get a value from private settings.
| string | $name Name |
Reimplemented from ElggEntity.
Definition at line 870 of file ElggPlugin.php.
| ElggPlugin::getAllSettings | ( | ) |
Returns an array of all settings saved for this plugin.
Definition at line 284 of file ElggPlugin.php.
| ElggPlugin::getAllUserSettings | ( | $ | user_guid = null |
) |
Returns an array of all user settings saved for this plugin for the user.
| int | $user_guid The user GUID. Defaults to logged in. |
Definition at line 398 of file ElggPlugin.php.
| ElggPlugin::getAvailableTextFiles | ( | ) |
Returns an array of available markdown files for this plugin.
Definition at line 160 of file ElggPlugin.php.
| ElggPlugin::getError | ( | ) |
Returns the last error message registered.
Definition at line 964 of file ElggPlugin.php.
| ElggPlugin::getFriendlyName | ( | ) |
Returns the manifest's name if available, otherwise the ID.
Definition at line 127 of file ElggPlugin.php.
| ElggPlugin::getID | ( | ) |
Returns the ID (dir name) of this plugin.
Definition at line 117 of file ElggPlugin.php.
| ElggPlugin::getManifest | ( | ) |
Returns this plugin's ElggPluginManifest object.
Definition at line 973 of file ElggPlugin.php.
| ElggPlugin::getPackage | ( | ) |
Returns this plugin's ElggPluginPackage object.
Definition at line 993 of file ElggPlugin.php.
| ElggPlugin::getPath | ( | ) |
Returns the plugin's full path with trailing slash.
Definition at line 141 of file ElggPlugin.php.
| ElggPlugin::getPriority | ( | ) |
| ElggPlugin::getSetting | ( | $ | name | ) |
Returns a plugin setting.
| string | $name The setting name |
Definition at line 273 of file ElggPlugin.php.
| ElggPlugin::getUserSetting | ( | $ | name, | |
| $ | user_guid = null | |||
| ) |
Returns a user's setting for this plugin.
| string | $name The setting name | |
| int | $user_guid The user GUID |
Definition at line 373 of file ElggPlugin.php.
| ElggPlugin::includeFile | ( | $ | filename | ) | [protected] |
Includes one of the plugins files.
| string | $filename The name of the file |
| PluginException |
Definition at line 750 of file ElggPlugin.php.
| ElggPlugin::initializeAttributes | ( | ) | [protected] |
Set subtype to 'plugin'.
Reimplemented from ElggObject.
Definition at line 24 of file ElggPlugin.php.
| ElggPlugin::isActive | ( | $ | site_guid = null |
) |
Is this plugin active?
| int | $site_guid Optional site guid. |
Definition at line 578 of file ElggPlugin.php.
| ElggPlugin::isValid | ( | ) |
Returns if the plugin is complete, meaning has all required files and Elgg can read them and they make sense.
Definition at line 553 of file ElggPlugin.php.
| ElggPlugin::registerClasses | ( | ) | [protected] |
Registers the plugin's classes.
| PluginException |
Definition at line 847 of file ElggPlugin.php.
| ElggPlugin::registerLanguages | ( | ) | [protected] |
Registers the plugin's languages.
| PluginException |
Definition at line 823 of file ElggPlugin.php.
| ElggPlugin::registerViews | ( | ) | [protected] |
Registers the plugin's views.
| PluginException |
Definition at line 784 of file ElggPlugin.php.
| ElggPlugin::save | ( | ) |
Save the plugin object.
Make sure required values exist.
Reimplemented from ElggObject.
Definition at line 90 of file ElggPlugin.php.
| ElggPlugin::set | ( | $ | name, | |
| $ | value | |||
| ) |
Save a value as private setting or attribute.
Attributes include title and description.
| string | $name Name | |
| mixed | $value Value |
Reimplemented from ElggEntity.
Definition at line 906 of file ElggPlugin.php.
| ElggPlugin::setID | ( | $ | id | ) |
Sets the location of this plugin.
| string | $id The path to the plugin's dir. |
Definition at line 151 of file ElggPlugin.php.
| ElggPlugin::setPriority | ( | $ | priority, | |
| $ | site_guid = null | |||
| ) |
Sets the priority of the plugin.
| mixed | $priority The priority to set. One of +1, -1, first, last, or a number. If given a number, this will displace all plugins at that number and set their priorities +1 | |
| mixed | $site_guid Optional site GUID. |
Definition at line 194 of file ElggPlugin.php.
| ElggPlugin::setSetting | ( | $ | name, | |
| $ | value | |||
| ) |
Set a plugin setting for the plugin.
| string | $name The name to set | |
| string | $value The value to set |
Definition at line 325 of file ElggPlugin.php.
| ElggPlugin::setUserSetting | ( | $ | name, | |
| $ | value, | |||
| $ | user_guid = null | |||
| ) |
Sets a user setting for a plugin.
| string | $name The setting name | |
| string | $value The setting value | |
| int | $user_guid The user GUID |
Definition at line 448 of file ElggPlugin.php.
| ElggPlugin::start | ( | $ | flags | ) |
Start the plugin.
| int | $flags Start flags for the plugin. See the constants in lib/plugins.php for details. |
| PluginException |
Definition at line 711 of file ElggPlugin.php.
| ElggPlugin::unsetAllSettings | ( | ) |
| ElggPlugin::unsetAllUserSettings | ( | $ | user_guid | ) |
Removes all User Settings for this plugin.
Use removeAllUsersSettings() to remove all user settings for all users. (Note the plural 'Users'.)
| int | $user_guid The user GUID to remove user settings. |
Definition at line 513 of file ElggPlugin.php.
| ElggPlugin::unsetAllUsersSettings | ( | ) |
Removes this plugin's user settings for all users.
Use removeAllUserSettings() if you just want to remove settings for a single user.
Definition at line 532 of file ElggPlugin.php.
| ElggPlugin::unsetSetting | ( | $ | name | ) |
Removes a plugin setting name and value.
| string | $name The setting name to remove |
Definition at line 340 of file ElggPlugin.php.
| ElggPlugin::unsetUserSetting | ( | $ | name, | |
| $ | user_guid = null | |||
| ) |
Removes a user setting name and value.
| string | $name The user setting name | |
| int | $user_guid The user GUID |
Definition at line 485 of file ElggPlugin.php.
1.6.3