Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100777714
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
Sun, Feb 2, 16:33
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Feb 4, 16:33 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24032445
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