Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548446
PhabricatorProjectLockTransaction.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
PhabricatorProjectLockTransaction.php
View Options
<?php
final
class
PhabricatorProjectLockTransaction
extends
PhabricatorProjectTransactionType
{
const
TRANSACTIONTYPE
=
'project:locked'
;
public
function
generateOldValue
(
$object
)
{
return
(
int
)
$object
->
getIsMembershipLocked
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsMembershipLocked
(
$value
);
}
public
function
getTitle
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
"%s locked this project's membership."
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
"%s unlocked this project's membership."
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s locked %s membership.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s unlocked %s membership.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
'fa-lock'
;
}
else
{
return
'fa-unlock'
;
}
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
if
(
$xactions
)
{
$this
->
requireApplicationCapability
(
ProjectCanLockProjectsCapability
::
CAPABILITY
);
}
return
array
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:49 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
116697
Default Alt Text
PhabricatorProjectLockTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment