Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F114339964
PhabricatorEditEngineConfigurationTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, May 25, 07:46
Size
2 KB
Mime Type
text/x-php
Expires
Tue, May 27, 07:46 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
26390940
Attached To
rPH Phabricator
PhabricatorEditEngineConfigurationTransaction.php
View Options
<?php
final
class
PhabricatorEditEngineConfigurationTransaction
extends
PhabricatorApplicationTransaction
{
const
TYPE_NAME
=
'editengine.config.name'
;
const
TYPE_PREAMBLE
=
'editengine.config.preamble'
;
const
TYPE_ORDER
=
'editengine.config.order'
;
const
TYPE_DEFAULT
=
'editengine.config.default'
;
const
TYPE_LOCKS
=
'editengine.config.locks'
;
const
TYPE_DEFAULTCREATE
=
'editengine.config.default.create'
;
const
TYPE_DISABLE
=
'editengine.config.disable'
;
public
function
getApplicationName
()
{
return
'search'
;
}
public
function
getApplicationTransactionType
()
{
return
PhabricatorEditEngineConfigurationPHIDType
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
null
;
}
public
function
getTitle
()
{
$author_phid
=
$this
->
getAuthorPHID
();
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
$type
=
$this
->
getTransactionType
();
switch
(
$type
)
{
case
self
::
TYPE_NAME
:
if
(
strlen
(
$old
))
{
return
pht
(
'%s renamed this form from "%s" to "%s".'
,
$this
->
renderHandleLink
(
$author_phid
),
$old
,
$new
);
}
else
{
return
pht
(
'%s named this form "%s".'
,
$this
->
renderHandleLink
(
$author_phid
),
$new
);
}
case
self
::
TYPE_PREAMBLE
:
return
pht
(
'%s updated the preamble for this form.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_ORDER
:
return
pht
(
'%s reordered the fields in this form.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_DEFAULT
:
$key
=
$this
->
getMetadataValue
(
'field.key'
);
return
pht
(
'%s changed the default value for field "%s".'
,
$this
->
renderHandleLink
(
$author_phid
),
$key
);
case
self
::
TYPE_LOCKS
:
return
pht
(
'%s changed locked and hidden fields.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_DEFAULTCREATE
:
if
(
$new
)
{
return
pht
(
'%s added this form to the "Create" menu.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s removed this form from the "Create" menu.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
case
self
::
TYPE_DISABLE
:
if
(
$new
)
{
return
pht
(
'%s disabled this form.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s enabled this form.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment