Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98249509
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
Sat, Jan 11, 11:15
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 13, 11:15 (2 d)
Engine
blob
Format
Raw Data
Handle
23543648
Attached To
rPH Phabricator
PhabricatorCalendarEventListController.php
View Options
<?php
final
class
PhabricatorCalendarEventListController
extends
PhabricatorCalendarController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
isGlobalDragAndDropUploadEnabled
()
{
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