Свойство | Тип | Описание | |
---|---|---|---|
$enabled | Setting to true will allow editor to interpret emoji aliases as Html equivalent markup. | ||
$instance | The singleton instance of this class. | ||
$ldelim | left-side delimiter surrounding emoji, typically a full-colon. | ||
$rdelim | right-side delimiter surrounding emoji, typically a full-colon |
Свойство | Тип | Описание | |
---|---|---|---|
$aliases | The emoji aliases are an array where each key is an alias and each value is the name of an emoji. | ||
$archive | The archive can be used for a couple of purposes. 1. If you want to remove an emoji from the lookup list then you can just move the entry from the $emoji array to the $archive array. 2. If you want to rename an emoji then copy it to the $archive array and then rename it in the $emoji array. | ||
$assetPath | The base path where the emoji are located. | ||
$assetPathOriginal | If assetPath is modified, this will hold the original path. | ||
$editorList | An emoji alias list that represents the emoji that display in an editor drop down. Typically, it is a copy of the alias list. | ||
$emoji | ~~~ array ( 'emoji_name' => 'filename.png' ) ~~~ | ||
$emojiOriginalUnaccountedFor | The original emoji that are not accounted for in the custom set of emoji supplied by plugin, if any. This is useful when merging the custom ones with the original ones, which have different assetPaths. | ||
$errorEmoji | This is the emoji name that will represent the error emoji. | ||
$format | The sprintf format for emoji with the following parameters. - %1$s: The emoji path. - %2$s: The emoji code. |
Метод | Описание | |
---|---|---|
buildEmojiPath ( string $emojiName ) : string | This method is deprecated. See {@link Emoji::getEmojiPath()}. | |
getAliases ( ) : array | Populate this with any aliases required for plugin, make sure they point to canonical translation, and plugin will add everything to drop down that is listed. To expand, simply define more aliases that corresponded with canonical list. | |
getArchive ( ) : array | Gets the emoji archive. | |
getAssetPath ( ) : string | Gets the asset path location. | |
getEditorList ( ) : array | Get the emoji editor list. | |
getEmoji ( ) : string | array | This is the canonical, e.g., official, list of emoji names along with their associatedwith image file name. For an exhaustive list of emoji names visit http://www.emoji-cheat-sheet.com/ and for the original image files being used, visit https://github.com/taninamdar/Apple-Color-Emoji | |
getEmojiEditorList ( ) : array | ||
getEmojiPath ( string $emojiName ) : string | Provide this method with the official emoji filename and it will return the correct path. | |
getFormat ( ) : string | Gets the emoji format used in {@link Emoji::img()}. | |
hasEditorList ( ) : boolean | Checks whether or not the emoji has an editor list. | |
img ( string $emoji_path, string $emoji_name ) : string | Accept an Emoji path and name, and return the corresponding HTML IMG tag. | |
instance ( ) : Emoji | Get the singleton instance of this class. | |
setAliases ( array $aliases ) : Emoji | Set the aliases array. | |
setArchive ( array $archive ) : Emoji | Set the emoji archive. | |
setAssetPath ( string $assetPath ) | ||
setEditorList ( array $value ) : Emoji | Set the list of emoji that can be used by the editor. | |
setEmoji ( array $emoji ) | Sets custom emoji, and saves the original ones that are unaccounted for. | |
setEmojiEditorList ( array $value ) | Set the list of emoji that can be used by the editor. | |
setFormat ( string $format ) : Emoji | Sets the emoji format used in {@link Emoji::img()}. | |
setFromManifest ( array $manifest, string $assetPath = '' ) | Set the emoji from a manifest. | |
translateToHtml ( string $Text ) : string | Translate all emoji aliases to their corresponding Html image tags. |
Метод | Описание | |
---|---|---|
__construct ( ) | ||
checkAliases ( ) | Check the alias array and filter out all of the emoji that are not present in the main emoji list. |
public buildEmojiPath ( string $emojiName ) : string | ||
$emojiName | string | |
Результат | string |
protected checkAliases ( ) |
public getAliases ( ) : array | ||
Результат | array | Returns an array of alias to emoji name entries. |
public getArchive ( ) : array | ||
Результат | array | Returns an array of emoji name to emoji file names representing the emoji archie. |
public getAssetPath ( ) : string | ||
Результат | string | The asset path location |
public getEditorList ( ) : array | ||
Результат | array | Returns an array of Emojis that can appear in an editor drop down. |
public getEmojiEditorList ( ) : array | ||
Результат | array | List of Emojis that will appear in the editor. |
public getEmojiPath ( string $emojiName ) : string | ||
$emojiName | string | File name of emoji icon. |
Результат | string | Root-relative path. |
public hasEditorList ( ) : boolean | ||
Результат | boolean | Returns true if there is an editor list or false otherwise. |
public static instance ( ) : Emoji | ||
Результат | Emoji |
public setAliases ( array $aliases ) : Emoji | ||
$aliases | array | The new aliases array. |
Результат | Emoji | Returns $this for fluent calls. |
public setArchive ( array $archive ) : Emoji | ||
$archive | array | |
Результат | Emoji | Returns $this for fluent calls. |
public setEditorList ( array $value ) : Emoji | ||
$value | array | The new editor list. |
Результат | Emoji | Returns $this for fluent calls. |
public setEmojiEditorList ( array $value ) | ||
$value | array | The new editor list. |
public setFromManifest ( array $manifest, string $assetPath = '' ) | ||
$manifest | array | An emoji manifest with the following keys: - emoji: An array in the form: name => filename (ex. ['smile' => 'smile.png']) - aliases (optional): An array of emoji short forms: alias => emojiName (ex. [':)' => 'smile']) - editor (optional): An array of emoji that will display in the editor: emojiName (ex: [smile,..]) - format (optional): The string format of the emoji replacement. |
$assetPath | string | The asset path root to all of the emoji files. |
public translateToHtml ( string $Text ) : string | ||
$Text | string | The actual user-submitted post |
Результат | string | Return the emoji-formatted post |
protected $aliases |
protected $archive |
protected $assetPathOriginal |
protected $editorList |
protected $emojiOriginalUnaccountedFor |
public $enabled |
protected $errorEmoji |
protected $format |
public static $instance |
public $ldelim |