Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F468495
HarbormasterBuildStepGroup.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
HarbormasterBuildStepGroup.php
View Options
<?php
abstract
class
HarbormasterBuildStepGroup
extends
Phobject
{
abstract
public
function
getGroupName
();
abstract
public
function
getGroupOrder
();
public
function
isEnabled
()
{
return
true
;
}
public
function
shouldShowIfEmpty
()
{
return
true
;
}
final
public
function
getGroupKey
()
{
$class
=
new
ReflectionClass
(
$this
);
$const
=
$class
->
getConstant
(
'GROUPKEY'
);
if
(
$const
===
false
)
{
throw
new
Exception
(
pht
(
'"%s" class "%s" must define a "%s" property.'
,
__CLASS__
,
get_class
(
$this
),
'GROUPKEY'
));
}
return
$const
;
}
final
public
static
function
getAllGroups
()
{
return
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
__CLASS__
)
->
setUniqueMethod
(
'getGroupKey'
)
->
setSortMethod
(
'getGroupOrder'
)
->
execute
();
}
final
public
static
function
getAllEnabledGroups
()
{
$groups
=
self
::
getAllGroups
();
foreach
(
$groups
as
$key
=>
$group
)
{
if
(!
$group
->
isEnabled
())
{
unset
(
$groups
[
$key
]);
}
}
return
$groups
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 5:31 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
80612
Default Alt Text
HarbormasterBuildStepGroup.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment