Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91783746
PhabricatorEditEngineLock.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
Thu, Nov 14, 10:42
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Nov 16, 10:42 (2 d)
Engine
blob
Format
Raw Data
Handle
22324306
Attached To
rPH Phabricator
PhabricatorEditEngineLock.php
View Options
<?php
abstract
class
PhabricatorEditEngineLock
extends
Phobject
{
private
$viewer
;
private
$object
;
final
public
function
setViewer
(
PhabricatorUser
$viewer
)
{
$this
->
viewer
=
$viewer
;
return
$this
;
}
final
public
function
getViewer
()
{
return
$this
->
viewer
;
}
final
public
function
setObject
(
$object
)
{
$this
->
object
=
$object
;
return
$this
;
}
final
public
function
getObject
()
{
return
$this
->
object
;
}
public
function
willPromptUserForLockOverrideWithDialog
(
AphrontDialogView
$dialog
)
{
return
$dialog
->
setTitle
(
pht
(
'Edit Locked Object'
))
->
appendParagraph
(
pht
(
'This object is locked. Edit it anyway?'
))
->
addSubmitButton
(
pht
(
'Override Lock'
));
}
public
function
willBlockUserInteractionWithDialog
(
AphrontDialogView
$dialog
)
{
return
$dialog
->
setTitle
(
pht
(
'Object Locked'
))
->
appendParagraph
(
pht
(
'You can not interact with this object because it is locked.'
));
}
public
function
getLockedObjectDisplayText
()
{
return
pht
(
'This object has been locked.'
);
}
public
static
function
newForObject
(
PhabricatorUser
$viewer
,
$object
)
{
if
(
$object
instanceof
PhabricatorEditEngineLockableInterface
)
{
$lock
=
$object
->
newEditEngineLock
();
}
else
{
$lock
=
new
PhabricatorEditEngineDefaultLock
();
}
return
$lock
->
setViewer
(
$viewer
)
->
setObject
(
$object
);
}
}
Event Timeline
Log In to Comment