Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105245131
PhabricatorSpacesNamespaceTransaction.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
Sat, Mar 15, 18:27
Size
2 KB
Mime Type
text/x-php
Expires
Mon, Mar 17, 18:27 (2 d)
Engine
blob
Format
Raw Data
Handle
24895064
Attached To
rPH Phabricator
PhabricatorSpacesNamespaceTransaction.php
View Options
<?php
final
class
PhabricatorSpacesNamespaceTransaction
extends
PhabricatorApplicationTransaction
{
const
TYPE_NAME
=
'spaces:name'
;
const
TYPE_DEFAULT
=
'spaces:default'
;
const
TYPE_DESCRIPTION
=
'spaces:description'
;
public
function
getApplicationName
()
{
return
'spaces'
;
}
public
function
getApplicationTransactionType
()
{
return
PhabricatorSpacesNamespacePHIDType
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
null
;
}
public
function
shouldHide
()
{
$old
=
$this
->
getOldValue
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_DESCRIPTION
:
return
(
$old
===
null
);
}
return
parent
::
shouldHide
();
}
public
function
hasChangeDetails
()
{
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_DESCRIPTION
:
return
true
;
}
return
parent
::
hasChangeDetails
();
}
public
function
getRemarkupBlocks
()
{
$blocks
=
parent
::
getRemarkupBlocks
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_DESCRIPTION
:
$blocks
[]
=
$this
->
getNewValue
();
break
;
}
return
$blocks
;
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
$author_phid
=
$this
->
getAuthorPHID
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_NAME
:
if
(
$old
===
null
)
{
return
pht
(
'%s created this space.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s renamed this space from "%s" to "%s".'
,
$this
->
renderHandleLink
(
$author_phid
),
$old
,
$new
);
}
case
self
::
TYPE_DESCRIPTION
:
return
pht
(
'%s updated the description for this space.'
,
$this
->
renderHandleLink
(
$author_phid
));
case
self
::
TYPE_DEFAULT
:
return
pht
(
'%s made this the default space.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment