Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1010342
ManiphestTaskExtensions.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
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
);
// If we're creating a new task, we don't bother loading any stored data.
// This allows any defaults configured by the Extensions object to
// survive.
if
(
$task
->
getID
())
{
$key
=
$aux
->
getAuxiliaryKey
();
$aux
->
setValueFromStorage
(
$task
->
getAuxiliaryAttribute
(
$key
));
}
}
return
$aux_fields
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jun 19, 1:42 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
245140
Default Alt Text
ManiphestTaskExtensions.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment