Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106872400
PhabricatorCalendarEventListController.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
Tue, Apr 1, 21:04
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Apr 3, 21:04 (2 d)
Engine
blob
Format
Raw Data
Handle
25267343
Attached To
rPH Phabricator
PhabricatorCalendarEventListController.php
View Options
<?php
final
class
PhabricatorCalendarEventListController
extends
PhabricatorCalendarController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$year
=
$request
->
getURIData
(
'year'
);
$month
=
$request
->
getURIData
(
'month'
);
$day
=
$request
->
getURIData
(
'day'
);
$engine
=
new
PhabricatorCalendarEventSearchEngine
();
if
(
$month
&&
$year
)
{
$engine
->
setCalendarYearAndMonthAndDay
(
$year
,
$month
,
$day
);
}
$nav_items
=
$this
->
buildNavigationItems
();
return
$engine
->
setNavigationItems
(
$nav_items
)
->
setController
(
$this
)
->
buildResponse
();
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
id
(
new
PhabricatorCalendarEventEditEngine
())
->
setViewer
(
$this
->
getViewer
())
->
addActionToCrumbs
(
$crumbs
);
return
$crumbs
;
}
protected
function
buildNavigationItems
()
{
$items
=
array
();
$items
[]
=
id
(
new
PHUIListItemView
())
->
setType
(
PHUIListItemView
::
TYPE_LABEL
)
->
setName
(
pht
(
'Import/Export'
));
$items
[]
=
id
(
new
PHUIListItemView
())
->
setName
(
'Imports'
)
->
setHref
(
'/calendar/import/'
);
$items
[]
=
id
(
new
PHUIListItemView
())
->
setName
(
'Exports'
)
->
setHref
(
'/calendar/export/'
);
return
$items
;
}
}
Event Timeline
Log In to Comment