Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103091685
ManiphestTaskExtensions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 27, 05:37
Size
839 B
Mime Type
text/x-php
Expires
Sat, Mar 1, 05:37 (2 d)
Engine
blob
Format
Raw Data
Handle
24493025
Attached To
rPH Phabricator
ManiphestTaskExtensions.php
View Options
<?php
/**
* @group maniphest
*/
abstract
class
ManiphestTaskExtensions
{
final
public
function
__construct
()
{
// <empty>
}
abstract
public
function
getAuxiliaryFieldSpecifications
();
final
public
static
function
newExtensions
()
{
$key
=
'maniphest.custom-task-extensions-class'
;
return
PhabricatorEnv
::
newObjectFromConfig
(
$key
);
}
public
function
loadFields
(
ManiphestTask
$task
,
PhabricatorUser
$viewer
)
{
$aux_fields
=
$this
->
getAuxiliaryFieldSpecifications
();
if
(!
$aux_fields
)
{
return
array
();
}
$task
->
loadAndAttachAuxiliaryAttributes
();
foreach
(
$aux_fields
as
$aux
)
{
$aux
->
setUser
(
$viewer
);
$aux
->
setTask
(
$task
);
$key
=
$aux
->
getAuxiliaryKey
();
$aux
->
setValueFromStorage
(
$task
->
getAuxiliaryAttribute
(
$key
));
}
return
$aux_fields
;
}
}
Event Timeline
Log In to Comment