Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F547562
MacroEmojiExample.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1010 B
Referenced Files
None
Subscribers
None
MacroEmojiExample.php
View Options
<?php
final
class
MacroEmojiExample
extends
PhabricatorUIExample
{
public
function
getName
()
{
return
pht
(
'Emoji'
);
}
public
function
getDescription
()
{
return
pht
(
'Shiny happy people holding hands.'
);
}
public
function
getCategory
()
{
return
pht
(
'Catalogs'
);
}
public
function
renderExample
()
{
$raw
=
id
(
new
PhabricatorEmojiRemarkupRule
())
->
markupEmojiJSON
();
$json
=
phutil_json_decode
(
$raw
);
$content
=
array
();
foreach
(
$json
as
$shortname
=>
$hex
)
{
$display_name
=
' '
.
$hex
.
' '
.
$shortname
;
$content
[]
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'ms grouped'
,
'style'
=>
'width: 240px; height: 24px; float: left;'
,
),
$display_name
);
}
$wrap
=
id
(
new
PHUIObjectBoxView
())
->
setHeaderText
(
pht
(
'Emojis'
))
->
addClass
(
'grouped'
)
->
appendChild
(
$content
);
return
phutil_tag
(
'div'
,
array
(),
array
(
$wrap
,
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:35 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121452
Default Alt Text
MacroEmojiExample.php (1010 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment