Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99160828
PhabricatorProfilePanelEditor.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
Tue, Jan 21, 20:35
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jan 23, 20:35 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23724244
Attached To
rPH Phabricator
PhabricatorProfilePanelEditor.php
View Options
<?php
final
class
PhabricatorProfilePanelEditor
extends
PhabricatorApplicationTransactionEditor
{
public
function
getEditorApplicationClass
()
{
return
'PhabricatorSearchApplication'
;
}
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Profile Panels'
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$types
[]
=
PhabricatorProfilePanelConfigurationTransaction
::
TYPE_PROPERTY
;
return
$types
;
}
protected
function
getCustomTransactionOldValue
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
PhabricatorProfilePanelConfigurationTransaction
::
TYPE_PROPERTY
:
$key
=
$xaction
->
getMetadataValue
(
'property.key'
);
return
$object
->
getPanelProperty
(
$key
,
null
);
}
}
protected
function
getCustomTransactionNewValue
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
PhabricatorProfilePanelConfigurationTransaction
::
TYPE_PROPERTY
:
return
$xaction
->
getNewValue
();
}
}
protected
function
applyCustomInternalTransaction
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
PhabricatorProfilePanelConfigurationTransaction
::
TYPE_PROPERTY
:
$key
=
$xaction
->
getMetadataValue
(
'property.key'
);
$value
=
$xaction
->
getNewValue
();
$object
->
setPanelProperty
(
$key
,
$value
);
return
;
}
return
parent
::
applyCustomInternalTransaction
(
$object
,
$xaction
);
}
protected
function
applyCustomExternalTransaction
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
PhabricatorProfilePanelConfigurationTransaction
::
TYPE_PROPERTY
:
return
;
}
return
parent
::
applyCustomExternalTransaction
(
$object
,
$xaction
);
}
}
Event Timeline
Log In to Comment