Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106244372
PhabricatorCalendarImportLogView.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
Sun, Mar 23, 23:46
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Mar 25, 23:46 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25072908
Attached To
rPH Phabricator
PhabricatorCalendarImportLogView.php
View Options
<?php
final
class
PhabricatorCalendarImportLogView
extends
AphrontView
{
private
$logs
=
array
();
private
$showImportSources
=
false
;
public
function
setLogs
(
array
$logs
)
{
assert_instances_of
(
$logs
,
'PhabricatorCalendarImportLog'
);
$this
->
logs
=
$logs
;
return
$this
;
}
public
function
getLogs
()
{
return
$this
->
logs
;
}
public
function
setShowImportSources
(
$show_import_sources
)
{
$this
->
showImportSources
=
$show_import_sources
;
return
$this
;
}
public
function
getShowImportSources
()
{
return
$this
->
showImportSources
;
}
public
function
render
()
{
return
$this
->
newTable
();
}
public
function
newTable
()
{
$viewer
=
$this
->
getViewer
();
$logs
=
$this
->
getLogs
();
$show_sources
=
$this
->
getShowImportSources
();
$rows
=
array
();
foreach
(
$logs
as
$log
)
{
$icon
=
$log
->
getDisplayIcon
(
$viewer
);
$color
=
$log
->
getDisplayColor
(
$viewer
);
$name
=
$log
->
getDisplayType
(
$viewer
);
$description
=
$log
->
getDisplayDescription
(
$viewer
);
$rows
[]
=
array
(
$log
->
getID
(),
(
$show_sources
?
$viewer
->
renderHandle
(
$log
->
getImport
()->
getPHID
())
:
null
),
id
(
new
PHUIIconView
())->
setIcon
(
$icon
,
$color
),
$name
,
$description
,
phabricator_datetime
(
$log
->
getDateCreated
(),
$viewer
),
);
}
$table
=
id
(
new
AphrontTableView
(
$rows
))
->
setHeaders
(
array
(
pht
(
'ID'
),
pht
(
'Source'
),
null
,
pht
(
'Type'
),
pht
(
'Message'
),
pht
(
'Date'
),
))
->
setColumnVisibility
(
array
(
true
,
$show_sources
,
))
->
setColumnClasses
(
array
(
null
,
null
,
null
,
'pri'
,
'wide'
,
null
,
));
return
$table
;
}
}
Event Timeline
Log In to Comment