Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78484103
PhabricatorRepositoryManagementListPathsWorkflow.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
Wed, Aug 21, 04:08
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Aug 23, 04:08 (2 d)
Engine
blob
Format
Raw Data
Handle
20053002
Attached To
rPH Phabricator
PhabricatorRepositoryManagementListPathsWorkflow.php
View Options
<?php
final
class
PhabricatorRepositoryManagementListPathsWorkflow
extends
PhabricatorRepositoryManagementWorkflow
{
protected
function
didConstruct
()
{
$this
->
setName
(
'list-paths'
)
->
setSynopsis
(
pht
(
'List repository local paths.'
))
->
setArguments
(
array
());
}
public
function
execute
(
PhutilArgumentParser
$args
)
{
$console
=
PhutilConsole
::
getConsole
();
$repos
=
id
(
new
PhabricatorRepositoryQuery
())
->
setViewer
(
$this
->
getViewer
())
->
execute
();
if
(!
$repos
)
{
$console
->
writeErr
(
"%s
\n
"
,
pht
(
'There are no repositories.'
));
return
0
;
}
$table
=
id
(
new
PhutilConsoleTable
())
->
addColumn
(
'monogram'
,
array
(
'title'
=>
pht
(
'Repository'
),
))
->
addColumn
(
'path'
,
array
(
'title'
=>
pht
(
'Path'
),
))
->
setBorders
(
true
);
foreach
(
$repos
as
$repo
)
{
$table
->
addRow
(
array
(
'monogram'
=>
$repo
->
getMonogram
(),
'path'
=>
$repo
->
getLocalPath
(),
));
}
$table
->
draw
();
return
0
;
}
}
Event Timeline
Log In to Comment