Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4088596
Feature.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
Feature.php
View Options
<?php
namespace
MobileFrontend\Features
;
/**
* @package MobileFrontend\Features
*/
class
Feature
implements
IFeature
{
private
const
DEFAULT_ENABLED_MODE
=
false
;
/**
* @var string
*/
private
$name
;
/**
* Feature group (mobile-frontend, minerva, ...)
* @var string
*/
private
$group
;
/**
* @var array
*/
private
$options
;
/**
* @param string $name feature name (used as an ID)
* @param string $group feature group (used as a translation prefix)
* @param array $options Feature options
*/
public
function
__construct
(
$name
,
$group
=
'mobile-frontend'
,
array
$options
=
[]
)
{
$this
->
name
=
$name
;
$this
->
group
=
$group
;
$this
->
options
=
$options
;
}
/**
* @inheritDoc
*/
public
function
__toString
()
{
return
$this
->
name
;
}
/**
* @inheritDoc
*/
public
function
isAvailable
(
IUserMode
$userMode
)
{
return
$this
->
options
[
$userMode
->
getModeIdentifier
()
]
??
self
::
DEFAULT_ENABLED_MODE
;
}
/**
* @inheritDoc
*/
public
function
getId
()
{
return
$this
->
name
;
}
/**
* @inheritDoc
*/
public
function
getGroup
()
{
return
$this
->
group
;
}
/**
* @inheritDoc
*/
public
function
getNameKey
()
{
return
$this
->
group
.
'-mobile-option-'
.
$this
->
name
;
}
/**
* @inheritDoc
*/
public
function
getDescriptionKey
()
{
return
$this
->
group
.
'-mobile-option-'
.
$this
->
name
.
'-description'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 18 2026, 10:03 (6 w, 16 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a8/a1/2703145a4d38d35dc6a1b626afb6
Default Alt Text
Feature.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment