Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104047798
DrydockLeaseController.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 6, 04:47
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Mar 8, 04:47 (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
24721036
Attached To
rPH Phabricator
DrydockLeaseController.php
View Options
<?php
abstract
class
DrydockLeaseController
extends
DrydockController
{
private
$resource
;
public
function
setResource
(
$resource
)
{
$this
->
resource
=
$resource
;
return
$this
;
}
public
function
getResource
()
{
return
$this
->
resource
;
}
public
function
buildSideNavView
()
{
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
$engine
=
id
(
new
DrydockLeaseSearchEngine
())
->
setViewer
(
$this
->
getRequest
()->
getUser
());
if
(
$this
->
getResource
())
{
$engine
->
setResource
(
$this
->
getResource
());
}
$engine
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
selectFilter
(
null
);
return
$nav
;
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$resource
=
$this
->
getResource
();
if
(
$resource
)
{
$id
=
$resource
->
getID
();
$crumbs
->
addTextCrumb
(
pht
(
'Resources'
),
$this
->
getApplicationURI
(
'resource/'
));
$crumbs
->
addTextCrumb
(
$resource
->
getName
(),
$this
->
getApplicationURI
(
"resource/{$id}/"
));
$crumbs
->
addTextCrumb
(
pht
(
'Leases'
),
$this
->
getApplicationURI
(
"resource/{$id}/leases/"
));
}
else
{
$crumbs
->
addTextCrumb
(
pht
(
'Leases'
),
$this
->
getApplicationURI
(
'lease/'
));
}
return
$crumbs
;
}
}
Event Timeline
Log In to Comment