Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893195
PhabricatorEditEngineLock.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
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
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 18:03 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127223
Default Alt Text
PhabricatorEditEngineLock.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment