Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F463880
PhabricatorAuthSSHKeyTableView.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
PhabricatorAuthSSHKeyTableView.php
View Options
<?php
final
class
PhabricatorAuthSSHKeyTableView
extends
AphrontView
{
private
$keys
;
private
$canEdit
;
private
$noDataString
;
public
function
setNoDataString
(
$no_data_string
)
{
$this
->
noDataString
=
$no_data_string
;
return
$this
;
}
public
function
setCanEdit
(
$can_edit
)
{
$this
->
canEdit
=
$can_edit
;
return
$this
;
}
public
function
setKeys
(
array
$keys
)
{
assert_instances_of
(
$keys
,
'PhabricatorAuthSSHKey'
);
$this
->
keys
=
$keys
;
return
$this
;
}
public
function
render
()
{
$keys
=
$this
->
keys
;
$viewer
=
$this
->
getUser
();
if
(
$this
->
canEdit
)
{
$delete_class
=
'small grey button'
;
}
else
{
$delete_class
=
'small grey button disabled'
;
}
$rows
=
array
();
foreach
(
$keys
as
$key
)
{
$rows
[]
=
array
(
javelin_tag
(
'a'
,
array
(
'href'
=>
'/auth/sshkey/edit/'
.
$key
->
getID
().
'/'
,
'sigil'
=>
'workflow'
,
),
$key
->
getName
()),
$key
->
getKeyComment
(),
$key
->
getKeyType
(),
phabricator_datetime
(
$key
->
getDateCreated
(),
$viewer
),
javelin_tag
(
'a'
,
array
(
'href'
=>
'/auth/sshkey/delete/'
.
$key
->
getID
().
'/'
,
'class'
=>
$delete_class
,
'sigil'
=>
'workflow'
,
),
pht
(
'Delete'
)),
);
}
$table
=
id
(
new
AphrontTableView
(
$rows
))
->
setNoDataString
(
$this
->
noDataString
)
->
setHeaders
(
array
(
pht
(
'Name'
),
pht
(
'Comment'
),
pht
(
'Type'
),
pht
(
'Added'
),
null
,
))
->
setColumnClasses
(
array
(
'wide pri'
,
''
,
''
,
'right'
,
'action'
,
));
return
$table
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 8:20 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
73462
Default Alt Text
PhabricatorAuthSSHKeyTableView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment