PHP Class EmojiExtenderPlugin, vanilla

Since: 1.0.0 Users can change or delete emoji sets for their forums.
Author: Becky Van Bussel ([email protected])
Inheritance: extends Gdn_Plugin
Datei anzeigen Open project: vanilla/vanilla

Protected Properties

Property Type Description
$emojiSets List of all available emoji sets.

Public Methods

Method Description
__construct ( ) Setup some variables and change emoji set.
addEmojiSet ( string $key, string | array $manifest, string $basePath ) Add an emoji set.
changeEmojiSet ( Emoji $emoji, string $emojiSetKey ) Change the emoji set used, either by merging or or overriding the default set.
emoji_init_handler ( Emoji $sender, array $args ) Subscribe to event in Emoji class instance method.
getEmojiSets ( ) : array Get all of the registered emoji sets.
settingsController_emojiExtender_create ( SettingsController $sender, array $args ) Configure settings page in dashboard.

Protected Methods

Method Description
getManifest ( array $emojiSet ) : array | null Get the manifest for am emoji set.

Method Details

__construct() public method

Setup some variables and change emoji set.
public __construct ( )

addEmojiSet() public method

Add an emoji set.
public addEmojiSet ( string $key, string | array $manifest, string $basePath )
$key string The key that defines the emoji set.
$manifest string | array The path to the manifest or the manifest itself.
$basePath string The url path to the emoji.

changeEmojiSet() public method

Change the emoji set used, either by merging or or overriding the default set.
public changeEmojiSet ( Emoji $emoji, string $emojiSetKey )
$emoji Emoji The emoji object to change.
$emojiSetKey string The name of the emoji set to enable.

emoji_init_handler() public method

Subscribe to event in Emoji class instance method.
public emoji_init_handler ( Emoji $sender, array $args )
$sender Emoji
$args array

getEmojiSets() public method

Get all of the registered emoji sets.
public getEmojiSets ( ) : array
return array Returns an array of all of the emoji sets.

getManifest() protected method

Get the manifest for am emoji set.
protected getManifest ( array $emojiSet ) : array | null
$emojiSet array The emoji set to look up.
return array | null Returns the manifest on success, `false` if the emoji should be disabled, or `null` otherwise.

settingsController_emojiExtender_create() public method

Configure settings page in dashboard.
public settingsController_emojiExtender_create ( SettingsController $sender, array $args )
$sender SettingsController
$args array

Property Details

$emojiSets protected_oe property

List of all available emoji sets.
protected $emojiSets