Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96118528
PhabricatorOwnersController.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, Dec 22, 20:02
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Dec 24, 20:02 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23125675
Attached To
rPH Phabricator
PhabricatorOwnersController.php
View Options
<?php
abstract
class
PhabricatorOwnersController
extends
PhabricatorController
{
private
$filter
;
private
function
getSideNavFilter
()
{
return
$this
->
filter
;
}
protected
function
setSideNavFilter
(
$filter
)
{
$this
->
filter
=
$filter
;
return
$this
;
}
public
function
buildSideNavView
()
{
$nav
=
new
AphrontSideNavFilterView
();
$base_uri
=
new
PhutilURI
(
'/owners/'
);
$nav
->
setBaseURI
(
$base_uri
);
$nav
->
addLabel
(
pht
(
'Packages'
));
$this
->
getExtraPackageViews
(
$nav
);
$nav
->
addFilter
(
'view/owned'
,
pht
(
'Owned'
));
$nav
->
addFilter
(
'view/projects'
,
pht
(
'Projects'
));
$nav
->
addFilter
(
'view/all'
,
pht
(
'All'
));
$nav
->
selectFilter
(
$this
->
getSideNavFilter
(),
'view/owned'
);
$filter
=
$nav
->
getSelectedFilter
();
switch
(
$filter
)
{
case
'view/owned'
:
$title
=
pht
(
'Owned Packages'
);
break
;
case
'view/all'
:
$title
=
pht
(
'All Packages'
);
break
;
case
'view/projects'
:
$title
=
pht
(
'Projects'
);
break
;
case
'new'
:
$title
=
pht
(
'New Package'
);
break
;
default
:
$title
=
pht
(
'Package'
);
break
;
}
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
$title
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Package'
))
->
setHref
(
'/owners/new/'
)
->
setIcon
(
'create'
));
$nav
->
setCrumbs
(
$crumbs
);
return
$nav
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
()->
getMenu
();
}
protected
function
getExtraPackageViews
(
AphrontSideNavFilterView
$view
)
{
return
;
}
}
Event Timeline
Log In to Comment