Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F458568
PhabricatorAuditRequestStatus.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
PhabricatorAuditRequestStatus.php
View Options
<?php
final
class
PhabricatorAuditRequestStatus
extends
Phobject
{
const
AUDIT_REQUIRED
=
'audit-required'
;
const
CONCERNED
=
'concerned'
;
const
ACCEPTED
=
'accepted'
;
const
AUDIT_REQUESTED
=
'requested'
;
const
RESIGNED
=
'resigned'
;
private
$key
;
public
static
function
newForStatus
(
$status
)
{
$result
=
new
self
();
$result
->
key
=
$status
;
return
$result
;
}
public
function
getIconIcon
()
{
return
$this
->
getMapProperty
(
'icon'
);
}
public
function
getIconColor
()
{
return
$this
->
getMapProperty
(
'icon.color'
);
}
public
function
getStatusName
()
{
$name
=
$this
->
getMapProperty
(
'name'
);
if
(
$name
!==
null
)
{
return
$name
;
}
return
pht
(
'Unknown Audit Request Status ("%s")'
,
$this
->
key
);
}
public
function
getStatusValue
()
{
return
$this
->
key
;
}
public
function
getStatusValueForConduit
()
{
return
$this
->
getMapProperty
(
'value.conduit'
);
}
public
function
isResigned
()
{
return
(
$this
->
key
===
self
::
RESIGNED
);
}
private
function
getMapProperty
(
$key
,
$default
=
null
)
{
$map
=
self
::
newStatusMap
();
$spec
=
idx
(
$map
,
$this
->
key
,
array
());
return
idx
(
$spec
,
$key
,
$default
);
}
private
static
function
newStatusMap
()
{
return
array
(
self
::
AUDIT_REQUIRED
=>
array
(
'name'
=>
pht
(
'Audit Required'
),
'icon'
=>
'fa-exclamation-circle'
,
'icon.color'
=>
'orange'
,
'value.conduit'
=>
'audit-required'
,
),
self
::
AUDIT_REQUESTED
=>
array
(
'name'
=>
pht
(
'Audit Requested'
),
'icon'
=>
'fa-exclamation-circle'
,
'icon.color'
=>
'orange'
,
'value.conduit'
=>
'audit-requested'
,
),
self
::
CONCERNED
=>
array
(
'name'
=>
pht
(
'Concern Raised'
),
'icon'
=>
'fa-times-circle'
,
'icon.color'
=>
'red'
,
'value.conduit'
=>
'concern-raised'
,
),
self
::
ACCEPTED
=>
array
(
'name'
=>
pht
(
'Accepted'
),
'icon'
=>
'fa-check-circle'
,
'icon.color'
=>
'green'
,
'value.conduit'
=>
'accepted'
,
),
self
::
RESIGNED
=>
array
(
'name'
=>
pht
(
'Resigned'
),
'icon'
=>
'fa-times'
,
'icon.color'
=>
'grey'
,
'value.conduit'
=>
'resigned'
,
),
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 12:20 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71470
Default Alt Text
PhabricatorAuditRequestStatus.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment