Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F531505
PhabricatorSpacesNamespaceDefaultTransaction.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
PhabricatorSpacesNamespaceDefaultTransaction.php
View Options
<?php
final
class
PhabricatorSpacesNamespaceDefaultTransaction
extends
PhabricatorSpacesNamespaceTransactionType
{
const
TRANSACTIONTYPE
=
'spaces:default'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getIsDefaultNamespace
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsDefaultNamespace
(
$value
);
}
public
function
getTitle
()
{
return
pht
(
'%s made this the default space.'
,
$this
->
renderAuthor
());
}
public
function
getTitleForFeed
()
{
return
pht
(
'%s made space %s the default space.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
$errors
=
array
();
if
(!
$this
->
isNewObject
())
{
foreach
(
$xactions
as
$xaction
)
{
$errors
[]
=
$this
->
newInvalidError
(
pht
(
'Only the first space created can be the default space, and '
.
'it must remain the default space evermore.'
));
}
}
return
$errors
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 3:52 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
102392
Default Alt Text
PhabricatorSpacesNamespaceDefaultTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment