Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F463056
AlmanacManagementUnlockWorkflow.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
AlmanacManagementUnlockWorkflow.php
View Options
<?php
final
class
AlmanacManagementUnlockWorkflow
extends
AlmanacManagementWorkflow
{
public
function
didConstruct
()
{
$this
->
setName
(
'unlock'
)
->
setSynopsis
(
pht
(
'Unlock a service to allow it to be edited.'
))
->
setArguments
(
array
(
array
(
'name'
=>
'services'
,
'wildcard'
=>
true
,
),
));
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$console
=
PhutilConsole
::
getConsole
();
$services
=
$this
->
loadServices
(
$args
->
getArg
(
'services'
));
if
(!
$services
)
{
throw
new
PhutilArgumentUsageException
(
pht
(
'Specify at least one service to unlock.'
));
}
foreach
(
$services
as
$service
)
{
if
(!
$service
->
getIsLocked
())
{
throw
new
PhutilArgumentUsageException
(
pht
(
'Service "%s" is not locked!'
,
$service
->
getName
()));
}
}
foreach
(
$services
as
$service
)
{
$this
->
updateServiceLock
(
$service
,
false
);
$console
->
writeOut
(
"**<bg:green> %s </bg>** %s
\n
"
,
pht
(
'UNLOCKED'
),
pht
(
'Service "%s" was unlocked.'
,
$service
->
getName
()));
}
return
0
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 6:49 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72913
Default Alt Text
AlmanacManagementUnlockWorkflow.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment