Метод | Описание | |
---|---|---|
__construct ( string $path ) | Creates a new plugin from path | |
__get ( string $name ) : mixed | Get an attribute or private setting value | |
__set ( string $name, mixed $value ) : void | Set a value as private setting or attribute. | |
activate ( ) : boolean | Actives the plugin for the current site. | |
canActivate ( ) : boolean | Checks if this plugin can be activated on the current Elgg installation. | |
canDeactivate ( ) : boolean | Checks if this plugin can be deactivated on the current Elgg installation. Validates that this plugin has no active dependants. | |
deactivate ( ) : boolean | Deactivates the plugin. | |
getAllSettings ( ) : array | Returns an array of all settings saved for this plugin. | |
getAllUserSettings ( integer $user_guid ) : array | Returns an array of all user settings saved for this plugin for the user. | |
getAvailableTextFiles ( ) : array | Returns an array of available markdown files for this plugin | |
getError ( ) : string | null | Returns the last error message registered. | |
getFriendlyName ( ) : string | Returns the manifest's name if available, otherwise the ID. | |
getID ( ) : string | Returns the ID (dir name) of this plugin | |
getManifest ( ) : ElggPluginManifest | null | Returns this plugin's \ElggPluginManifest object | |
getPackage ( ) : ElggPluginPackage | null | Returns this plugin's \ElggPluginPackage object | |
getPath ( ) : string | Returns the plugin's full path with trailing slash. | |
getPriority ( ) : integer | Gets the plugin's load priority. | |
getSetting ( string $name, mixed $default = null ) : mixed | Returns a plugin setting | |
getStaticConfig ( string $key, mixed $default = null ) : mixed | Get a value from the plugins's static config file. | |
getUserSetting ( string $name, integer $user_guid, mixed $default = null ) : mixed | Returns a user's setting for this plugin | |
isActive ( ) : boolean | Is this plugin active? | |
isValid ( ) : boolean | Returns if the plugin is complete, meaning has all required files and Elgg can read them and they make sense. | |
save ( ) : boolean | Save the plugin object. Make sure required values exist. | |
setID ( string $id ) : boolean | Sets the location of this plugin. | |
setPriority ( mixed $priority ) : boolean | Sets the priority of the plugin | |
setSetting ( string $name, string $value ) : boolean | Set a plugin setting for the plugin | |
setUserSetting ( string $name, string $value, integer $user_guid ) : mixed | Sets a user setting for a plugin | |
start ( integer $flags ) : true | Start the plugin. | |
unsetAllSettings ( ) : boolean | Removes all settings for this plugin. | |
unsetAllUserSettings ( integer $user_guid ) : boolean | Removes all User Settings for this plugin for a particular user | |
unsetAllUsersSettings ( ) : boolean | Removes this plugin's user settings for all users. | |
unsetSetting ( string $name ) : boolean | Removes a plugin setting name and value. | |
unsetUserSetting ( string $name, integer $user_guid ) : boolean | Removes a user setting name and value. |
Метод | Описание | |
---|---|---|
canReadFile ( string $filename ) : boolean | Checks whether a plugin file with the given name exists | |
includeFile ( string $filename ) : mixed | Includes one of the plugins files | |
initializeAttributes ( ) : void | Set subtype to 'plugin' | |
registerActions ( ) : void | Registers the plugin's actions provided in the plugin config file | |
registerClasses ( ) : true | Registers the plugin's classes | |
registerLanguages ( ) : true | Registers the plugin's languages | |
registerViews ( ) : void | Registers the plugin's views | |
registerWidgets ( ) : void | Registers the plugin's widgets provided in the plugin config file |
Метод | Описание | |
---|---|---|
isStaticConfigValid ( ) : boolean | If a static config file is present, is it a serializable array? | |
setStatus ( boolean $active ) : boolean | Sets the plugin to active or inactive. |
public __construct ( string $path ) | ||
$path | string | The absolute path of the plugin |
public canActivate ( ) : boolean | ||
Результат | boolean |
public canDeactivate ( ) : boolean | ||
Результат | boolean |
protected canReadFile ( string $filename ) : boolean | ||
$filename | string | The name of the file |
Результат | boolean |
public deactivate ( ) : boolean | ||
Результат | boolean |
public getAllSettings ( ) : array | ||
Результат | array | An array of key/value pairs. |
public getAllUserSettings ( integer $user_guid ) : array | ||
$user_guid | integer | The user GUID. Defaults to logged in. |
Результат | array | An array of key/value pairs. |
public getAvailableTextFiles ( ) : array | ||
Результат | array |
public getFriendlyName ( ) : string | ||
Результат | string |
public getManifest ( ) : ElggPluginManifest | null | ||
Результат | ElggPluginManifest | null |
public getPackage ( ) : ElggPluginPackage | null | ||
Результат | ElggPluginPackage | null |
public getPriority ( ) : integer | ||
Результат | integer |
protected includeFile ( string $filename ) : mixed | ||
$filename | string | The name of the file |
Результат | mixed | The return value of the included file (or 1 if there is none) |
protected initializeAttributes ( ) : void | ||
Результат | void |
protected registerActions ( ) : void | ||
Результат | void |
protected registerClasses ( ) : true | ||
Результат | true |
protected registerLanguages ( ) : true | ||
Результат | true |
protected registerViews ( ) : void | ||
Результат | void |
protected registerWidgets ( ) : void | ||
Результат | void |
public setPriority ( mixed $priority ) : boolean | ||
$priority | mixed | 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 |
Результат | boolean |
public unsetAllSettings ( ) : boolean | ||
Результат | boolean |
public unsetAllUserSettings ( integer $user_guid ) : boolean | ||
$user_guid | integer | The user GUID to remove user settings. |
Результат | boolean |
public unsetAllUsersSettings ( ) : boolean | ||
Результат | boolean |
public unsetSetting ( string $name ) : boolean | ||
$name | string | The setting name to remove |
Результат | boolean |