Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106650425
DrydockResourceController.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, Mar 29, 09:48
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Mar 31, 10:48 (2 d)
Engine
blob
Format
Raw Data
Handle
25244828
Attached To
rPH Phabricator
DrydockResourceController.php
View Options
<?php
abstract
class
DrydockResourceController
extends
DrydockController
{
private
$blueprint
;
public
function
setBlueprint
(
$blueprint
)
{
$this
->
blueprint
=
$blueprint
;
return
$this
;
}
public
function
getBlueprint
()
{
return
$this
->
blueprint
;
}
public
function
buildSideNavView
()
{
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
$engine
=
id
(
new
DrydockResourceSearchEngine
())
->
setViewer
(
$this
->
getViewer
());
if
(
$this
->
getBlueprint
())
{
$engine
->
setBlueprint
(
$this
->
getBlueprint
());
}
$engine
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
selectFilter
(
null
);
return
$nav
;
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$blueprint
=
$this
->
getBlueprint
();
if
(
$blueprint
)
{
$id
=
$blueprint
->
getID
();
$crumbs
->
addTextCrumb
(
pht
(
'Blueprints'
),
$this
->
getApplicationURI
(
'blueprint/'
));
$crumbs
->
addTextCrumb
(
$blueprint
->
getBlueprintName
(),
$this
->
getApplicationURI
(
"blueprint/{$id}/"
));
$crumbs
->
addTextCrumb
(
pht
(
'Resources'
),
$this
->
getApplicationURI
(
"blueprint/{$id}/resources/"
));
}
else
{
$crumbs
->
addTextCrumb
(
pht
(
'Resources'
),
$this
->
getApplicationURI
(
'resource/'
));
}
return
$crumbs
;
}
}
Event Timeline
Log In to Comment