Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2896085
PhortuneMerchantSubscriptionsController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
PhortuneMerchantSubscriptionsController.php
View Options
<?php
final
class
PhortuneMerchantSubscriptionsController
extends
PhortuneMerchantProfileController
{
protected
function
shouldRequireMerchantEditCapability
(
)
{
return
true
;
}
protected
function
handleMerchantRequest
(
AphrontRequest
$request
)
{
$merchant
=
$this
->
getMerchant
(
)
;
$title
=
$merchant
->
getName
(
)
;
$crumbs
=
$this
->
buildApplicationCrumbs
(
)
->
addTextCrumb
(
pht
(
'Subscriptions'
)
)
->
setBorder
(
true
)
;
$header
=
$this
->
buildHeaderView
(
)
;
$subscriptions
=
$this
->
buildSubscriptionsSection
(
$merchant
)
;
$view
=
id
(
new
PHUITwoColumnView
(
)
)
->
setHeader
(
$header
)
->
setFooter
(
array
(
$subscriptions
,
)
)
;
$navigation
=
$this
->
buildSideNavView
(
'subscriptions'
)
;
return
$this
->
newPage
(
)
->
setTitle
(
$title
)
->
setCrumbs
(
$crumbs
)
->
setNavigation
(
$navigation
)
->
appendChild
(
$view
)
;
}
private
function
buildSubscriptionsSection
(
PhortuneMerchant
$merchant
)
{
$viewer
=
$this
->
getViewer
(
)
;
$subscriptions
=
id
(
new
PhortuneSubscriptionQuery
(
)
)
->
setViewer
(
$viewer
)
->
withMerchantPHIDs
(
array
(
$merchant
->
getPHID
(
)
)
)
->
setLimit
(
25
)
->
execute
(
)
;
$subscriptions_uri
=
$merchant
->
getSubscriptionListURI
(
)
;
$table
=
id
(
new
PhortuneSubscriptionTableView
(
)
)
->
setUser
(
$viewer
)
->
setSubscriptions
(
$subscriptions
)
;
$header
=
id
(
new
PHUIHeaderView
(
)
)
->
setHeader
(
pht
(
'Subscriptions'
)
)
->
addActionLink
(
id
(
new
PHUIButtonView
(
)
)
->
setTag
(
'a'
)
->
setIcon
(
'fa-list'
)
->
setHref
(
$subscriptions_uri
)
->
setText
(
pht
(
'View All Subscriptions'
)
)
)
;
return
id
(
new
PHUIObjectBoxView
(
)
)
->
setHeader
(
$header
)
->
setBackground
(
PHUIObjectBoxView
::
BLUE_PROPERTY
)
->
setTable
(
$table
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 22:30 (6 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129429
Default Alt Text
PhortuneMerchantSubscriptionsController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment