Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F116912657
PhabricatorRepositoryNameTransaction.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
Tue, Jun 10, 03:10
Size
804 B
Mime Type
text/x-php
Expires
Thu, Jun 12, 03:10 (1 d, 11 h)
Engine
blob
Format
Raw Data
Handle
26671756
Attached To
rPH Phabricator
PhabricatorRepositoryNameTransaction.php
View Options
<?php
final
class
PhabricatorRepositoryNameTransaction
extends
PhabricatorRepositoryTransactionType
{
const
TRANSACTIONTYPE
=
'repo:name'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getName
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setName
(
$value
);
}
public
function
getTitle
()
{
return
pht
(
'%s renamed this repository from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderOldValue
(),
$this
->
renderNewValue
());
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
$errors
=
array
();
if
(
$this
->
isEmptyTextTransaction
(
$object
->
getName
(),
$xactions
))
{
$errors
[]
=
$this
->
newRequiredError
(
pht
(
'Repositories must have a name.'
));
}
return
$errors
;
}
}
Event Timeline
Log In to Comment