Page MenuHomePhabricator

D20372.id48597.diff
No OneTemporary

D20372.id48597.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2927,8 +2927,6 @@
'PhabricatorDashboardObjectInstallWorkflow' => 'applications/dashboard/install/PhabricatorDashboardObjectInstallWorkflow.php',
'PhabricatorDashboardPanel' => 'applications/dashboard/storage/PhabricatorDashboardPanel.php',
'PhabricatorDashboardPanelArchiveController' => 'applications/dashboard/controller/panel/PhabricatorDashboardPanelArchiveController.php',
- 'PhabricatorDashboardPanelCoreCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelCoreCustomField.php',
- 'PhabricatorDashboardPanelCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelCustomField.php',
'PhabricatorDashboardPanelDatasource' => 'applications/dashboard/typeahead/PhabricatorDashboardPanelDatasource.php',
'PhabricatorDashboardPanelEditConduitAPIMethod' => 'applications/dashboard/conduit/PhabricatorDashboardPanelEditConduitAPIMethod.php',
'PhabricatorDashboardPanelEditController' => 'applications/dashboard/controller/panel/PhabricatorDashboardPanelEditController.php',
@@ -2938,14 +2936,12 @@
'PhabricatorDashboardPanelNameTransaction' => 'applications/dashboard/xaction/panel/PhabricatorDashboardPanelNameTransaction.php',
'PhabricatorDashboardPanelNgrams' => 'applications/dashboard/storage/PhabricatorDashboardPanelNgrams.php',
'PhabricatorDashboardPanelPHIDType' => 'applications/dashboard/phid/PhabricatorDashboardPanelPHIDType.php',
+ 'PhabricatorDashboardPanelPropertyTransaction' => 'applications/dashboard/xaction/panel/PhabricatorDashboardPanelPropertyTransaction.php',
'PhabricatorDashboardPanelQuery' => 'applications/dashboard/query/PhabricatorDashboardPanelQuery.php',
'PhabricatorDashboardPanelRenderController' => 'applications/dashboard/controller/panel/PhabricatorDashboardPanelRenderController.php',
'PhabricatorDashboardPanelRenderingEngine' => 'applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php',
- 'PhabricatorDashboardPanelSearchApplicationCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php',
'PhabricatorDashboardPanelSearchEngine' => 'applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php',
- 'PhabricatorDashboardPanelSearchQueryCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelSearchQueryCustomField.php',
'PhabricatorDashboardPanelStatusTransaction' => 'applications/dashboard/xaction/panel/PhabricatorDashboardPanelStatusTransaction.php',
- 'PhabricatorDashboardPanelTabsCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php',
'PhabricatorDashboardPanelTransaction' => 'applications/dashboard/storage/PhabricatorDashboardPanelTransaction.php',
'PhabricatorDashboardPanelTransactionEditor' => 'applications/dashboard/editor/PhabricatorDashboardPanelTransactionEditor.php',
'PhabricatorDashboardPanelTransactionQuery' => 'applications/dashboard/query/PhabricatorDashboardPanelTransactionQuery.php',
@@ -2985,6 +2981,7 @@
'PhabricatorDashboardSchemaSpec' => 'applications/dashboard/storage/PhabricatorDashboardSchemaSpec.php',
'PhabricatorDashboardSearchEngine' => 'applications/dashboard/query/PhabricatorDashboardSearchEngine.php',
'PhabricatorDashboardTabsPanelType' => 'applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php',
+ 'PhabricatorDashboardTextPanelTextTransaction' => 'applications/dashboard/xaction/panel/PhabricatorDashboardTextPanelTextTransaction.php',
'PhabricatorDashboardTextPanelType' => 'applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php',
'PhabricatorDashboardTransaction' => 'applications/dashboard/storage/PhabricatorDashboardTransaction.php',
'PhabricatorDashboardTransactionEditor' => 'applications/dashboard/editor/PhabricatorDashboardTransactionEditor.php',
@@ -8898,17 +8895,11 @@
'PhabricatorDashboardDAO',
'PhabricatorApplicationTransactionInterface',
'PhabricatorPolicyInterface',
- 'PhabricatorCustomFieldInterface',
'PhabricatorFlaggableInterface',
'PhabricatorDestructibleInterface',
'PhabricatorNgramsInterface',
),
'PhabricatorDashboardPanelArchiveController' => 'PhabricatorDashboardController',
- 'PhabricatorDashboardPanelCoreCustomField' => array(
- 'PhabricatorDashboardPanelCustomField',
- 'PhabricatorStandardCustomFieldInterface',
- ),
- 'PhabricatorDashboardPanelCustomField' => 'PhabricatorCustomField',
'PhabricatorDashboardPanelDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorDashboardPanelEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
'PhabricatorDashboardPanelEditController' => 'PhabricatorDashboardController',
@@ -8918,14 +8909,12 @@
'PhabricatorDashboardPanelNameTransaction' => 'PhabricatorDashboardPanelTransactionType',
'PhabricatorDashboardPanelNgrams' => 'PhabricatorSearchNgrams',
'PhabricatorDashboardPanelPHIDType' => 'PhabricatorPHIDType',
+ 'PhabricatorDashboardPanelPropertyTransaction' => 'PhabricatorDashboardPanelTransactionType',
'PhabricatorDashboardPanelQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorDashboardPanelRenderController' => 'PhabricatorDashboardController',
'PhabricatorDashboardPanelRenderingEngine' => 'Phobject',
- 'PhabricatorDashboardPanelSearchApplicationCustomField' => 'PhabricatorStandardCustomField',
'PhabricatorDashboardPanelSearchEngine' => 'PhabricatorApplicationSearchEngine',
- 'PhabricatorDashboardPanelSearchQueryCustomField' => 'PhabricatorStandardCustomField',
'PhabricatorDashboardPanelStatusTransaction' => 'PhabricatorDashboardPanelTransactionType',
- 'PhabricatorDashboardPanelTabsCustomField' => 'PhabricatorStandardCustomField',
'PhabricatorDashboardPanelTransaction' => 'PhabricatorModularTransaction',
'PhabricatorDashboardPanelTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
'PhabricatorDashboardPanelTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
@@ -8970,6 +8959,7 @@
'PhabricatorDashboardSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'PhabricatorDashboardSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorDashboardTabsPanelType' => 'PhabricatorDashboardPanelType',
+ 'PhabricatorDashboardTextPanelTextTransaction' => 'PhabricatorDashboardPanelPropertyTransaction',
'PhabricatorDashboardTextPanelType' => 'PhabricatorDashboardPanelType',
'PhabricatorDashboardTransaction' => 'PhabricatorApplicationTransaction',
'PhabricatorDashboardTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelCoreCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelCoreCustomField.php
deleted file mode 100644
--- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelCoreCustomField.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-final class PhabricatorDashboardPanelCoreCustomField
- extends PhabricatorDashboardPanelCustomField
- implements PhabricatorStandardCustomFieldInterface {
-
- public function getStandardCustomFieldNamespace() {
- return 'dashboard:core';
- }
-
- public function createFields($object) {
- if (!$object->getPanelType()) {
- return array();
- }
-
- $impl = $object->requireImplementation();
- $specs = $impl->getFieldSpecifications();
- return PhabricatorStandardCustomField::buildStandardFields($this, $specs);
- }
-
- public function shouldUseStorage() {
- return false;
- }
-
- public function readValueFromObject(PhabricatorCustomFieldInterface $object) {
- $key = $this->getProxy()->getRawStandardFieldKey();
- $this->setValueFromStorage($object->getProperty($key));
- $this->didSetValueFromStorage();
- }
-
- public function applyApplicationTransactionInternalEffects(
- PhabricatorApplicationTransaction $xaction) {
- $object = $this->getObject();
- $key = $this->getProxy()->getRawStandardFieldKey();
-
- $this->setValueFromApplicationTransactions($xaction->getNewValue());
- $value = $this->getValueForStorage();
-
- $object->setProperty($key, $value);
- }
-
- public function applyApplicationTransactionExternalEffects(
- PhabricatorApplicationTransaction $xaction) {
- return;
- }
-
-}
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelCustomField.php
deleted file mode 100644
--- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelCustomField.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-
-abstract class PhabricatorDashboardPanelCustomField
- extends PhabricatorCustomField {}
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
deleted file mode 100644
--- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-final class PhabricatorDashboardPanelSearchApplicationCustomField
- extends PhabricatorStandardCustomField {
-
- public function getFieldType() {
- return 'search.application';
- }
-
- public function shouldAppearInApplicationSearch() {
- return false;
- }
-
- public function renderEditControl(array $handles) {
- $engines = id(new PhutilClassMapQuery())
- ->setAncestorClass('PhabricatorApplicationSearchEngine')
- ->setFilterMethod('canUseInPanelContext')
- ->execute();
-
- $all_apps = id(new PhabricatorApplicationQuery())
- ->setViewer($this->getViewer())
- ->withUnlisted(false)
- ->withInstalled(true)
- ->execute();
- foreach ($engines as $index => $engine) {
- if (!isset($all_apps[$engine->getApplicationClassName()])) {
- unset($engines[$index]);
- continue;
- }
- }
-
- $options = array();
-
- $value = $this->getFieldValue();
- if (strlen($value) && empty($engines[$value])) {
- $options[$value] = $value;
- }
-
- $engines = msort($engines, 'getResultTypeDescription');
- foreach ($engines as $class_name => $engine) {
- $options[$class_name] = $engine->getResultTypeDescription();
- }
-
- return id(new AphrontFormSelectControl())
- ->setID($this->getFieldControlID())
- ->setLabel($this->getFieldName())
- ->setCaption($this->getCaption())
- ->setName($this->getFieldKey())
- ->setValue($this->getFieldValue())
- ->setOptions($options);
- }
-
-}
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchQueryCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchQueryCustomField.php
deleted file mode 100644
--- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchQueryCustomField.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-final class PhabricatorDashboardPanelSearchQueryCustomField
- extends PhabricatorStandardCustomField {
-
- public function getFieldType() {
- return 'search.query';
- }
-
- public function shouldAppearInApplicationSearch() {
- return false;
- }
-
- public function renderEditControl(array $handles) {
- $engines = id(new PhutilClassMapQuery())
- ->setAncestorClass('PhabricatorApplicationSearchEngine')
- ->setFilterMethod('canUseInPanelContext')
- ->execute();
-
- $value = $this->getFieldValue();
-
- $queries = array();
- $seen = false;
- foreach ($engines as $engine_class => $engine) {
- $engine->setViewer($this->getViewer());
- $engine_queries = $engine->loadEnabledNamedQueries();
- $query_map = mpull($engine_queries, 'getQueryName', 'getQueryKey');
- asort($query_map);
-
- foreach ($query_map as $key => $name) {
- $queries[$engine_class][] = array('key' => $key, 'name' => $name);
- if ($key == $value) {
- $seen = true;
- }
- }
- }
-
- if (strlen($value) && !$seen) {
- $name = pht('Custom Query ("%s")', $value);
- } else {
- $name = pht('(None)');
- }
-
- $options = array($value => $name);
-
- $app_control_key = $this->getFieldConfigValue('control.application');
- Javelin::initBehavior(
- 'dashboard-query-panel-select',
- array(
- 'applicationID' => $this->getFieldControlID($app_control_key),
- 'queryID' => $this->getFieldControlID(),
- 'options' => $queries,
- 'value' => array(
- 'key' => strlen($value) ? $value : null,
- 'name' => $name,
- ),
- ));
-
- return id(new AphrontFormSelectControl())
- ->setID($this->getFieldControlID())
- ->setLabel($this->getFieldName())
- ->setCaption($this->getCaption())
- ->setName($this->getFieldKey())
- ->setValue($this->getFieldValue())
- ->setOptions($options);
- }
-
-}
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php
deleted file mode 100644
--- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-final class PhabricatorDashboardPanelTabsCustomField
- extends PhabricatorStandardCustomField {
-
- public function getFieldType() {
- return 'dashboard.tabs';
- }
-
- public function shouldAppearInApplicationSearch() {
- return false;
- }
-
- public function readValueFromRequest(AphrontRequest $request) {
- $value = array();
-
- $names = $request->getArr($this->getFieldKey().'_name');
- $panel_ids = $request->getArr($this->getFieldKey().'_panelID');
- $panels = array();
- foreach ($panel_ids as $panel_id) {
- $panels[] = $panel_id[0];
- }
- foreach ($names as $idx => $name) {
- $panel_id = idx($panels, $idx);
- if (strlen($name) && $panel_id) {
- $value[] = array(
- 'name' => $name,
- 'panelID' => $panel_id,
- );
- }
- }
-
- $this->setFieldValue($value);
- }
-
- public function getApplicationTransactionTitle(
- PhabricatorApplicationTransaction $xaction) {
- $author_phid = $xaction->getAuthorPHID();
- $old = $xaction->getOldValue();
- $new = $xaction->getNewValue();
-
- $new_tabs = array();
- if ($new) {
- foreach ($new as $new_tab) {
- $new_tabs[] = $new_tab['name'];
- }
- $new_tabs = implode(' | ', $new_tabs);
- }
-
- $old_tabs = array();
- if ($old) {
- foreach ($old as $old_tab) {
- $old_tabs[] = $old_tab['name'];
- }
- $old_tabs = implode(' | ', $old_tabs);
- }
-
- if (!$old) {
- // In case someone makes a tab panel with no tabs.
- if ($new) {
- return pht(
- '%s set the tabs to "%s".',
- $xaction->renderHandleLink($author_phid),
- $new_tabs);
- }
- } else if (!$new) {
- return pht(
- '%s removed tabs.',
- $xaction->renderHandleLink($author_phid));
- } else {
- return pht(
- '%s changed the tabs from "%s" to "%s".',
- $xaction->renderHandleLink($author_phid),
- $old_tabs,
- $new_tabs);
- }
- }
-
- public function renderEditControl(array $handles) {
- // NOTE: This includes archived panels so we don't mutate the tabs
- // when saving a tab panel that includes archived panels. This whole UI is
- // hopefully temporary anyway.
-
- $value = $this->getFieldValue();
- if (!is_array($value)) {
- $value = array();
- }
-
- $out = array();
- for ($ii = 1; $ii <= 6; $ii++) {
- $tab = idx($value, ($ii - 1), array());
- $panel = idx($tab, 'panelID', null);
- $panel_id = array();
- if ($panel) {
- $panel_id[] = $panel;
- }
- $out[] = id(new AphrontFormTextControl())
- ->setName($this->getFieldKey().'_name[]')
- ->setValue(idx($tab, 'name'))
- ->setLabel(pht('Tab %d Name', $ii));
-
- $out[] = id(new AphrontFormTokenizerControl())
- ->setUser($this->getViewer())
- ->setDatasource(new PhabricatorDashboardPanelDatasource())
- ->setName($this->getFieldKey().'_panelID[]')
- ->setValue($panel_id)
- ->setLimit(1)
- ->setLabel(pht('Tab %d Panel', $ii));
- }
-
- return $out;
- }
-
-}
diff --git a/src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php b/src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
--- a/src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
+++ b/src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
@@ -98,7 +98,7 @@
return $dashboard->getURI();
}
- return parent::getEffectiveObjectDoneURI($object);
+ return parent::getEffectiveObjectEditDoneURI($object);
}
protected function getObjectEditTitleText($object) {
@@ -138,7 +138,7 @@
}
protected function buildCustomEditFields($object) {
- return array(
+ $fields = array(
id(new PhabricatorTextEditField())
->setKey('name')
->setLabel(pht('Name'))
@@ -150,6 +150,13 @@
->setIsRequired(true)
->setValue($object->getName()),
);
+
+ $panel_fields = $object->getEditEngineFields();
+ foreach ($panel_fields as $panel_field) {
+ $fields[] = $panel_field;
+ }
+
+ return $fields;
}
}
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelType.php
@@ -5,7 +5,6 @@
abstract public function getPanelTypeKey();
abstract public function getPanelTypeName();
abstract public function getPanelTypeDescription();
- abstract public function getFieldSpecifications();
abstract public function getIcon();
abstract public function renderPanelContent(
@@ -53,4 +52,11 @@
->execute();
}
+ final public function getEditEngineFields(PhabricatorDashboardPanel $panel) {
+ return $this->newEditEngineFields($panel);
+ }
+
+ abstract protected function newEditEngineFields(
+ PhabricatorDashboardPanel $panel);
+
}
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
@@ -21,23 +21,9 @@
'revisions you need to review.');
}
- public function getFieldSpecifications() {
- return array(
- 'class' => array(
- 'name' => pht('Search For'),
- 'type' => 'search.application',
- ),
- 'key' => array(
- 'name' => pht('Query'),
- 'type' => 'search.query',
- 'control.application' => 'class',
- ),
- 'limit' => array(
- 'name' => pht('Limit'),
- 'caption' => pht('Leave this blank for the default number of items.'),
- 'type' => 'text',
- ),
- );
+ protected function newEditEngineFields(PhabricatorDashboardPanel $panel) {
+ // TODO: Restore this using EditEngine instead of CustomField.
+ return array();
}
public function initializeFieldsFromRequest(
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
@@ -19,13 +19,9 @@
return pht('Use tabs to switch between several other panels.');
}
- public function getFieldSpecifications() {
- return array(
- 'config' => array(
- 'name' => pht('Tabs'),
- 'type' => 'dashboard.tabs',
- ),
- );
+ protected function newEditEngineFields(PhabricatorDashboardPanel $panel) {
+ // TODO: Restore this using EditEngine instead of CustomField.
+ return array();
}
public function shouldRenderAsync() {
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php
@@ -21,12 +21,14 @@
'context.');
}
- public function getFieldSpecifications() {
+ protected function newEditEngineFields(PhabricatorDashboardPanel $panel) {
return array(
- 'text' => array(
- 'name' => pht('Text'),
- 'type' => 'remarkup',
- ),
+ id(new PhabricatorRemarkupEditField())
+ ->setKey('text')
+ ->setLabel(pht('Text'))
+ ->setTransactionType(
+ PhabricatorDashboardTextPanelTextTransaction::TRANSACTIONTYPE)
+ ->setValue($panel->getProperty('text', '')),
);
}
diff --git a/src/applications/dashboard/storage/PhabricatorDashboardPanel.php b/src/applications/dashboard/storage/PhabricatorDashboardPanel.php
--- a/src/applications/dashboard/storage/PhabricatorDashboardPanel.php
+++ b/src/applications/dashboard/storage/PhabricatorDashboardPanel.php
@@ -8,7 +8,6 @@
implements
PhabricatorApplicationTransactionInterface,
PhabricatorPolicyInterface,
- PhabricatorCustomFieldInterface,
PhabricatorFlaggableInterface,
PhabricatorDestructibleInterface,
PhabricatorNgramsInterface {
@@ -21,8 +20,6 @@
protected $isArchived = 0;
protected $properties = array();
- private $customFields = self::ATTACHABLE;
-
public static function initializeNewPanel(PhabricatorUser $actor) {
return id(new PhabricatorDashboardPanel())
->setName('')
@@ -105,6 +102,10 @@
return $impl;
}
+ public function getEditEngineFields() {
+ return $this->requireImplementation()->getEditEngineFields($this);
+ }
+
/* -( PhabricatorApplicationTransactionInterface )------------------------- */
@@ -142,27 +143,6 @@
}
-/* -( PhabricatorCustomFieldInterface )------------------------------------ */
-
-
- public function getCustomFieldSpecificationForRole($role) {
- return array();
- }
-
- public function getCustomFieldBaseClass() {
- return 'PhabricatorDashboardPanelCustomField';
- }
-
- public function getCustomFields() {
- return $this->assertAttached($this->customFields);
- }
-
- public function attachCustomFields(PhabricatorCustomFieldAttachment $fields) {
- $this->customFields = $fields;
- return $this;
- }
-
-
/* -( PhabricatorDestructibleInterface )----------------------------------- */
diff --git a/src/applications/dashboard/xaction/panel/PhabricatorDashboardPanelPropertyTransaction.php b/src/applications/dashboard/xaction/panel/PhabricatorDashboardPanelPropertyTransaction.php
new file mode 100644
--- /dev/null
+++ b/src/applications/dashboard/xaction/panel/PhabricatorDashboardPanelPropertyTransaction.php
@@ -0,0 +1,18 @@
+<?php
+
+abstract class PhabricatorDashboardPanelPropertyTransaction
+ extends PhabricatorDashboardPanelTransactionType {
+
+ abstract protected function getPropertyKey();
+
+ public function generateOldValue($object) {
+ $property_key = $this->getPropertyKey();
+ return $object->getProperty($property_key);
+ }
+
+ public function applyInternalEffects($object, $value) {
+ $property_key = $this->getPropertyKey();
+ $object->setProperty($property_key, $value);
+ }
+
+}
diff --git a/src/applications/dashboard/xaction/panel/PhabricatorDashboardTextPanelTextTransaction.php b/src/applications/dashboard/xaction/panel/PhabricatorDashboardTextPanelTextTransaction.php
new file mode 100644
--- /dev/null
+++ b/src/applications/dashboard/xaction/panel/PhabricatorDashboardTextPanelTextTransaction.php
@@ -0,0 +1,12 @@
+<?php
+
+final class PhabricatorDashboardTextPanelTextTransaction
+ extends PhabricatorDashboardPanelPropertyTransaction {
+
+ const TRANSACTIONTYPE = 'text.text';
+
+ protected function getPropertyKey() {
+ return 'text';
+ }
+
+}

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 22, 9:26 AM (20 h, 53 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7716826
Default Alt Text
D20372.id48597.diff (24 KB)

Event Timeline