Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105871182
ReleephController.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
Thu, Mar 20, 10:48
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Mar 22, 10:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25063348
Attached To
rPH Phabricator
ReleephController.php
View Options
<?php
abstract
class
ReleephController
extends
PhabricatorController
{
public
function
buildStandardPageResponse
(
$view
,
array
$data
)
{
$page
=
$this
->
buildStandardPageView
();
$page
->
setApplicationName
(
pht
(
'Releeph'
));
$page
->
setBaseURI
(
'/releeph/'
);
$page
->
setTitle
(
idx
(
$data
,
'title'
));
$page
->
setGlyph
(
"
\x
D3
\x
82"
);
$page
->
appendChild
(
$view
);
$response
=
new
AphrontWebpageResponse
();
return
$response
->
setContent
(
$page
->
render
());
}
public
function
buildSideNavView
(
$for_app
=
false
)
{
$user
=
$this
->
getRequest
()->
getUser
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
if
(
$for_app
)
{
$nav
->
addFilter
(
'project/create/'
,
pht
(
'Create Product'
));
}
id
(
new
ReleephProductSearchEngine
())
->
setViewer
(
$user
)
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
selectFilter
(
null
);
return
$nav
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
(
true
)->
getMenu
();
}
protected
function
getProductViewURI
(
ReleephProject
$product
)
{
return
$this
->
getApplicationURI
(
'project/'
.
$product
->
getID
().
'/'
);
}
protected
function
getBranchViewURI
(
ReleephBranch
$branch
)
{
return
$this
->
getApplicationURI
(
'branch/'
.
$branch
->
getID
().
'/'
);
}
}
Event Timeline
Log In to Comment