Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81525282
AlmanacSetPropertyEditType.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
Fri, Sep 6, 13:27
Size
695 B
Mime Type
text/x-php
Expires
Sun, Sep 8, 13:27 (2 d)
Engine
blob
Format
Raw Data
Handle
20591110
Attached To
rPH Phabricator
AlmanacSetPropertyEditType.php
View Options
<?php
final
class
AlmanacSetPropertyEditType
extends
PhabricatorEditType
{
public
function
generateTransactions
(
PhabricatorApplicationTransaction
$template
,
array
$spec
)
{
$value
=
idx
(
$spec
,
'value'
);
if
(!
is_array
(
$value
))
{
throw
new
Exception
(
pht
(
'Transaction value when setting Almanac properties must be a map '
.
'with property names as keys.'
));
}
$xactions
=
array
();
foreach
(
$value
as
$property_key
=>
$property_value
)
{
$xactions
[]
=
$this
->
newTransaction
(
$template
)
->
setMetadataValue
(
'almanac.property'
,
$property_key
)
->
setNewValue
(
$property_value
);
}
return
$xactions
;
}
}
Event Timeline
Log In to Comment