Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99845632
PhabricatorCalendarImportLogSearchEngine.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, Jan 26, 22:37
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 28, 22:37 (2 d)
Engine
blob
Format
Raw Data
Handle
23834123
Attached To
rPH Phabricator
PhabricatorCalendarImportLogSearchEngine.php
View Options
<?php
final
class
PhabricatorCalendarImportLogSearchEngine
extends
PhabricatorApplicationSearchEngine
{
public
function
getResultTypeDescription
()
{
return
pht
(
'Calendar Import Logs'
);
}
public
function
getApplicationClassName
()
{
return
'PhabricatorCalendarApplication'
;
}
public
function
newQuery
()
{
return
new
PhabricatorCalendarImportLogQuery
();
}
protected
function
buildCustomSearchFields
()
{
return
array
(
id
(
new
PhabricatorPHIDsSearchField
())
->
setLabel
(
pht
(
'Import Sources'
))
->
setKey
(
'importSourcePHIDs'
)
->
setAliases
(
array
(
'importSourcePHID'
)),
);
}
protected
function
buildQueryFromParameters
(
array
$map
)
{
$query
=
$this
->
newQuery
();
if
(
$map
[
'importSourcePHIDs'
])
{
$query
->
withImportPHIDs
(
$map
[
'importSourcePHIDs'
]);
}
return
$query
;
}
protected
function
getURI
(
$path
)
{
return
'/calendar/import/log/'
.
$path
;
}
protected
function
getBuiltinQueryNames
()
{
$names
=
array
(
'all'
=>
pht
(
'All Logs'
),
);
return
$names
;
}
public
function
buildSavedQueryFromBuiltin
(
$query_key
)
{
$query
=
$this
->
newSavedQuery
();
$query
->
setQueryKey
(
$query_key
);
switch
(
$query_key
)
{
case
'all'
:
return
$query
;
}
return
parent
::
buildSavedQueryFromBuiltin
(
$query_key
);
}
protected
function
renderResultList
(
array
$logs
,
PhabricatorSavedQuery
$query
,
array
$handles
)
{
assert_instances_of
(
$logs
,
'PhabricatorCalendarImportLog'
);
$viewer
=
$this
->
requireViewer
();
$view
=
id
(
new
PhabricatorCalendarImportLogView
())
->
setShowImportSources
(
true
)
->
setViewer
(
$viewer
)
->
setLogs
(
$logs
);
return
id
(
new
PhabricatorApplicationSearchResultView
())
->
setTable
(
$view
->
newTable
());
}
}
Event Timeline
Log In to Comment