Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2352216
PonderQuestionStatus.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
PonderQuestionStatus.php
View Options
<?php
final
class
PonderQuestionStatus
extends
PonderConstants
{
const
STATUS_OPEN
=
'open'
;
const
STATUS_CLOSED_RESOLVED
=
'resolved'
;
const
STATUS_CLOSED_OBSOLETE
=
'obsolete'
;
const
STATUS_CLOSED_DUPLICATE
=
'duplicate'
;
public
static
function
getQuestionStatusMap
()
{
return
array
(
self
::
STATUS_OPEN
=>
pht
(
'Open'
),
self
::
STATUS_CLOSED_RESOLVED
=>
pht
(
'Closed, Resolved'
),
self
::
STATUS_CLOSED_OBSOLETE
=>
pht
(
'Closed, Obsolete'
),
self
::
STATUS_CLOSED_DUPLICATE
=>
pht
(
'Closed, Duplicate'
),
);
}
public
static
function
getQuestionStatusFullName
(
$status
)
{
$map
=
array
(
self
::
STATUS_OPEN
=>
pht
(
'Open'
),
self
::
STATUS_CLOSED_RESOLVED
=>
pht
(
'Closed, Resolved'
),
self
::
STATUS_CLOSED_OBSOLETE
=>
pht
(
'Closed, Obsolete'
),
self
::
STATUS_CLOSED_DUPLICATE
=>
pht
(
'Closed, Duplicate'
),
);
return
idx
(
$map
,
$status
,
pht
(
'Unknown'
));
}
public
static
function
getQuestionStatusDescription
(
$status
)
{
$map
=
array
(
self
::
STATUS_OPEN
=>
pht
(
'This question is open for answers.'
),
self
::
STATUS_CLOSED_RESOLVED
=>
pht
(
'This question has been resolved.'
),
self
::
STATUS_CLOSED_OBSOLETE
=>
pht
(
'This question is no longer valid or out of date.'
),
self
::
STATUS_CLOSED_DUPLICATE
=>
pht
(
'This question is a duplicate of another question.'
),
);
return
idx
(
$map
,
$status
,
pht
(
'Unknown'
));
}
public
static
function
getQuestionStatusTagColor
(
$status
)
{
$map
=
array
(
self
::
STATUS_OPEN
=>
PHUITagView
::
COLOR_BLUE
,
self
::
STATUS_CLOSED_RESOLVED
=>
PHUITagView
::
COLOR_BLACK
,
self
::
STATUS_CLOSED_OBSOLETE
=>
PHUITagView
::
COLOR_BLACK
,
self
::
STATUS_CLOSED_DUPLICATE
=>
PHUITagView
::
COLOR_BLACK
,
);
return
idx
(
$map
,
$status
);
}
public
static
function
getQuestionStatusIcon
(
$status
)
{
$map
=
array
(
self
::
STATUS_OPEN
=>
'fa-question-circle'
,
self
::
STATUS_CLOSED_RESOLVED
=>
'fa-check'
,
self
::
STATUS_CLOSED_OBSOLETE
=>
'fa-ban'
,
self
::
STATUS_CLOSED_DUPLICATE
=>
'fa-clone'
,
);
return
idx
(
$map
,
$status
);
}
public
static
function
getQuestionStatusOpenMap
()
{
return
array
(
self
::
STATUS_OPEN
,
);
}
public
static
function
getQuestionStatusClosedMap
()
{
return
array
(
self
::
STATUS_CLOSED_RESOLVED
,
self
::
STATUS_CLOSED_OBSOLETE
,
self
::
STATUS_CLOSED_DUPLICATE
,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 12:35 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
447196
Default Alt Text
PonderQuestionStatus.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment