Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485167
Storage.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Storage.php
View Options
<?php
namespace
App\Handlers
;
class
Storage
extends
\App\Handlers\Base
{
public
const
MAX_ITEMS
=
100
;
public
const
ITEM_UNIT
=
'GB'
;
/**
* The entitleable class for this handler.
*
* @return string
*/
public
static
function
entitleableClass
():
string
{
return
\App\User
::
class
;
}
/**
* SKU handler metadata.
*
* @param \App\Sku $sku The SKU object
*
* @return array
*/
public
static
function
metadata
(
\App\Sku
$sku
):
array
{
$data
=
parent
::
metadata
(
$sku
);
$data
[
'readonly'
]
=
true
;
// only the checkbox will be disabled, not range
$data
[
'enabled'
]
=
true
;
$data
[
'range'
]
=
[
'min'
=>
$sku
->
units_free
,
'max'
=>
self
::
MAX_ITEMS
,
'unit'
=>
self
::
ITEM_UNIT
,
];
return
$data
;
}
/**
* The priority that specifies the order of SKUs in UI.
* Higher number means higher on the list.
*
* @return int
*/
public
static
function
priority
():
int
{
return
90
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 21, 5:19 AM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387385
Default Alt Text
Storage.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment