Moodle  2.2.1
http://www.collinsharper.com
emoticon_manager Class Reference

Public Member Functions

 get_emoticons ()
 prepare_renderable_emoticon (stdClass $emoticon, array $attributes=array())
 encode_stored_config (array $emoticons)
 decode_stored_config ($encoded)
 default_emoticons ()

Protected Member Functions

 prepare_emoticon_object ($text, $imagename, $altidentifier=null, $altcomponent= 'core_pix', $imagecomponent= 'core')

Detailed Description

Provides core support for plugins that have to deal with emoticons (like HTML editor or emoticon filter).

Whenever this manager mentiones 'emoticon object', the following data structure is expected: stdClass with properties text, imagename, imagecomponent, altidentifier and altcomponent

See also:
admin_setting_emoticons

Definition at line 7116 of file moodlelib.php.


Member Function Documentation

decode_stored_config ( encoded)

Decodes the string into an array of emoticon objects

See also:
self::encode_stored_config()
Parameters:
string$encoded
Returns:
string|null

Definition at line 7176 of file moodlelib.php.

Here is the caller graph for this function:

Returns default set of emoticons supported by Moodle

Returns:
array of sdtClasses

Definition at line 7189 of file moodlelib.php.

Here is the call graph for this function:

encode_stored_config ( array emoticons)

Encodes the array of emoticon objects into a string storable in config table

See also:
self::decode_stored_config()
Parameters:
array$emoticonsarray of emtocion objects
Returns:
string

Definition at line 7165 of file moodlelib.php.

Returns the currently enabled emoticons

Returns:
array of emoticon objects

Definition at line 7123 of file moodlelib.php.

Here is the call graph for this function:

prepare_emoticon_object ( text,
imagename,
altidentifier = null,
altcomponent = 'core_pix',
imagecomponent = 'core' 
) [protected]

Helper method preparing the stdClass with the emoticon properties

Parameters:
string | array$textor array of strings
string$imagenameto be used by {
See also:
pix_emoticon}
Parameters:
string$altidentifieralternative string identifier, null for no alt
array$altcomponentwhere the alternative string is defined
string$imagecomponentto be used by {
See also:
pix_emoticon}
Returns:
stdClass

Definition at line 7234 of file moodlelib.php.

Here is the caller graph for this function:

prepare_renderable_emoticon ( stdClass $  emoticon,
array attributes = array() 
)

Converts emoticon object into renderable pix_emoticon object

Parameters:
stdClass$emoticonemoticon object
array$attributesexplicit HTML attributes to set
Returns:
pix_emoticon

Definition at line 7148 of file moodlelib.php.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations