Property | Type | Description | |
---|---|---|---|
$Sender | object |
Method | Description | |
---|---|---|
__construct ( ) | Initialize a new instance of the {@link Gdn_Plugin} class. | |
autoToggle ( object $Sender, mixed $Redirect = null ) | Automatically handle the toggle effect. | |
autoTogglePath ( null $Path = null ) : null | string | ||
controller_index ( $sender ) | ||
dispatch ( $Sender, array $RequestArgs = [] ) : mixed | ||
getAddon ( ) : |
Get the addon that this plugin belongs to. | |
getPluginFolder ( boolean $absolute = true ) : string | Get the plugin's folder. | |
getPluginIndex ( ) : string | Gets the case-sensitive plugin key. | |
getPluginKey ( string $key, mixed $default = null ) : mixed | Get a specific value from the plugin info array. | |
getPluginName ( ) : string | Get the human-readable name of the plugin. | |
getResource ( string $filePath, boolean $include = false, boolean $absolute = true ) : string | Gets the path to a file within the plugin's folder (and optionally include it). | |
getView ( string $ViewName ) : string | Converts view files to Render() paths. | |
getWebResource ( string $filePath, boolean $withDomain = false ) : string | Get a static resource for this addon suitable to be served from the browser. | |
instance ( ) : Gdn_Plugin | Get an instance of the calling class. | |
isEnabled ( ) : boolean | Convenience method for determining 2nd level activation. | |
render ( string $view ) | Passthru render request to sender. | |
setAddon ( |
Set the addon that this plugin belongs to. | |
setup ( ) | Implementation of {@link Gdn_IPlugin::Setup()}. | |
userMetaModel ( ) : UserMetaModel | Instance of UserMetaModel. |
Method | Description | |
---|---|---|
getUserMeta ( integer | array $userID, string $key, mixed $default = null, boolean $autoUnfold = false ) : array | Retries UserMeta information for a UserID/Key pair. | |
makeMetaKey ( string $relativeUserKey ) : string | This method takes a UserKey (short relative form) and prepends the plugin prefix. | |
setUserMeta ( $UserID, $Key, $Value = null ) : void | Sets UserMeta data to the UserMeta table | |
trimMetaKey ( $FullyQualifiedUserKey ) : string | This method trims the plugin prefix from a fully qualified MetaKey. |
public __construct ( ) |
public autoToggle ( object $Sender, mixed $Redirect = null ) | ||
$Sender | object | Reference to the invoking controller |
$Redirect | mixed |
public getAddon ( ) : |
||
return | Returns the addon. |
public getPluginFolder ( boolean $absolute = true ) : string | ||
$absolute | boolean | Whether or not the folder should be absolute. |
return | string | Returns the folder or an empty string if there is no addon associated with this object. |
public getPluginIndex ( ) : string | ||
return | string |
public getPluginName ( ) : string | ||
return | string | Returns the name of the plugin. |
public getResource ( string $filePath, boolean $include = false, boolean $absolute = true ) : string | ||
$filePath | string | A relative path to a file within the plugin's folder. |
$include | boolean | Whether or not to immediately include() the file if it exists. |
$absolute | boolean | Whether or not to prepend the full document root to the path. |
return | string | path to the file |
protected getUserMeta ( integer | array $userID, string $key, mixed $default = null, boolean $autoUnfold = false ) : array | ||
$userID | integer | array | The UserID or array of UserIDs. |
$key | string | The relative user meta key. |
$default | mixed | An optional default return value if key is not found. |
$autoUnfold | boolean | Automatically return key item for single key queries. |
return | array | Return the results or $Default. |
public static instance ( ) : Gdn_Plugin | ||
return | Gdn_Plugin |
protected makeMetaKey ( string $relativeUserKey ) : string | ||
$relativeUserKey | string | The relative user meta key. |
return | string | Returns a fully qualified meta key. |
public setAddon ( |
||
$addon | The new addon. | |
return | Gdn_Plugin | Returns `$this` for fluent calls. |
protected setUserMeta ( $UserID, $Key, $Value = null ) : void | ||
$UserID | int UserID or array of UserIDs | |
$Key | string relative user key | |
$Value | mixed optional value to set, null to delete | |
return | void |
protected trimMetaKey ( $FullyQualifiedUserKey ) : string | ||
return | string | relative meta key |
public userMetaModel ( ) : UserMetaModel | ||
return | UserMetaModel |