Add
CSmileSet::add( Array( 'STRING_ID' => 'new_category', 'SORT' => 300, 'TYPE' => CSmileSet::TYPE_SET, 'LANG' => Array( 'en' => 'New category', ) ) );
Adds set of smileys. Static method.
Parameters
Parameter | Description |
---|---|
STRING_ID | String key for search and import |
SORT | Sorting |
TYPE | Type that can be CSmileSet::TYPE_SET - set, CSmileSet::TYPE_GALLERY - gallery. |
LANG | Smiley name |
PARENT_ID | Parent gallery ID |
Returned value
Returns $ID on success and false otherwise ([link=89744]CApplicationException Class[/link] is created)
Пример
Adding:
$id = CSmileGallery::add( Array( 'STRING_ID' => 'gallery_darneo', 'SORT' => 100, 'LANG' => Array( 'en' => 'New gallery', ) ) ); $result = CSmileSet::add( Array( 'STRING_ID' => 'list_gallery', 'SORT' => 100, 'PARENT_ID' => $id, 'TYPE' => CSmileSet::TYPE_SET, 'LANG' => Array( 'en' => 'New category', ) ) ); echo $result;
© «Bitrix24», 2001-2024