Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F457822
PhabricatorCommentEditEngineExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorCommentEditEngineExtension.php
View Options
<?php
final
class
PhabricatorCommentEditEngineExtension
extends
PhabricatorEditEngineExtension
{
const
EXTENSIONKEY
=
'transactions.comment'
;
public
function
getExtensionPriority
()
{
return
9000
;
}
public
function
isExtensionEnabled
()
{
return
true
;
}
public
function
getExtensionName
()
{
return
pht
(
'Comments'
);
}
public
function
supportsObject
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
$xaction
=
$object
->
getApplicationTransactionTemplate
();
try
{
$comment
=
$xaction
->
getApplicationTransactionCommentObject
();
}
catch
(
PhutilMethodNotImplementedException
$ex
)
{
$comment
=
null
;
}
return
(
bool
)
$comment
;
}
public
function
buildCustomEditFields
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
$comment_type
=
PhabricatorTransactions
::
TYPE_COMMENT
;
$comment_field
=
id
(
new
PhabricatorCommentEditField
())
->
setKey
(
'comment'
)
->
setLabel
(
pht
(
'Comments'
))
->
setAliases
(
array
(
'comments'
))
->
setIsHidden
(
true
)
->
setIsReorderable
(
false
)
->
setIsDefaultable
(
false
)
->
setIsLockable
(
false
)
->
setTransactionType
(
$comment_type
)
->
setConduitDescription
(
pht
(
'Make comments.'
))
->
setConduitTypeDescription
(
pht
(
'Comment to add, formatted as remarkup.'
))
->
setValue
(
null
);
return
array
(
$comment_field
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 10:24 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71460
Default Alt Text
PhabricatorCommentEditEngineExtension.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment