Пример #1
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhamePostTransaction::TYPE_TITLE:
             return $object->setTitle($xaction->getNewValue());
         case PhamePostTransaction::TYPE_SUBTITLE:
             return $object->setSubtitle($xaction->getNewValue());
         case PhamePostTransaction::TYPE_BODY:
             return $object->setBody($xaction->getNewValue());
         case PhamePostTransaction::TYPE_BLOG:
             return $object->setBlogPHID($xaction->getNewValue());
         case PhamePostTransaction::TYPE_HEADERIMAGE:
             return $object->setHeaderImagePHID($xaction->getNewValue());
         case PhamePostTransaction::TYPE_VISIBILITY:
             if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) {
                 $object->setDatePublished(0);
             } else {
                 if ($xaction->getNewValue() == PhameConstants::VISIBILITY_ARCHIVED) {
                     $object->setDatePublished(0);
                 } else {
                     $object->setDatePublished(PhabricatorTime::getNow());
                 }
             }
             return $object->setVisibility($xaction->getNewValue());
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $type = $xaction->getTransactionType();
     switch ($type) {
         case PhabricatorBadgesTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorBadgesTransaction::TYPE_FLAVOR:
             $object->setFlavor($xaction->getNewValue());
             return;
         case PhabricatorBadgesTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
         case PhabricatorBadgesTransaction::TYPE_ICON:
             $object->setIcon($xaction->getNewValue());
             return;
         case PhabricatorBadgesTransaction::TYPE_QUALITY:
             $object->setQuality($xaction->getNewValue());
             return;
         case PhabricatorBadgesTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #3
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacNetworkTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #4
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacTransaction::TYPE_PROPERTY_UPDATE:
         case AlmanacTransaction::TYPE_PROPERTY_REMOVE:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HarbormasterBuildableTransaction::TYPE_CREATE:
         case HarbormasterBuildableTransaction::TYPE_COMMAND:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #6
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case FundBackerTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #7
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case DifferentialDiffTransaction::TYPE_DIFF_CREATE:
             $dict = $this->diffDataDict;
             $this->updateDiffFromDict($object, $dict);
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #8
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacBindingTransaction::TYPE_INTERFACE:
             $interface = id(new AlmanacInterfaceQuery())->setViewer($this->requireActor())->withPHIDs(array($xaction->getNewValue()))->executeOne();
             $object->setDevicePHID($interface->getDevicePHID());
             $object->setInterfacePHID($interface->getPHID());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #9
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneAccountTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorTransactions::TYPE_EDGE:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorDashboardPanelTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorDashboardPanelTransaction::TYPE_ARCHIVE:
             $object->setIsArchived((int) $xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HarbormasterBuildPlanTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case HarbormasterBuildPlanTransaction::TYPE_STATUS:
             $object->setPlanStatus($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #12
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhluxTransaction::TYPE_EDIT_KEY:
             $object->setVariableKey($xaction->getNewValue());
             return;
         case PhluxTransaction::TYPE_EDIT_VALUE:
             $object->setVariableValue($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #13
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case DrydockBlueprintTransaction::TYPE_NAME:
             $object->setBlueprintName($xaction->getNewValue());
             return;
         case DrydockBlueprintTransaction::TYPE_DISABLED:
             $object->setIsDisabled((int) $xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneMerchantTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhortuneMerchantTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #15
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorTransactions::TYPE_COMMENT:
         case PhabricatorTransactions::TYPE_SUBSCRIBERS:
         case PhabricatorTransactions::TYPE_EDGE:
         case PhabricatorAuditActionConstants::ACTION:
         case PhabricatorAuditActionConstants::INLINE:
         case PhabricatorAuditActionConstants::ADD_AUDITORS:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #16
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhamePostTransaction::TYPE_TITLE:
             return $object->setTitle($xaction->getNewValue());
         case PhamePostTransaction::TYPE_PHAME_TITLE:
             return $object->setPhameTitle($xaction->getNewValue());
         case PhamePostTransaction::TYPE_BODY:
             return $object->setBody($xaction->getNewValue());
         case PhamePostTransaction::TYPE_COMMENTS_WIDGET:
             return $object->setCommentsWidget($xaction->getNewValue());
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortunePaymentProviderConfigTransaction::TYPE_CREATE:
             return;
         case PhortunePaymentProviderConfigTransaction::TYPE_PROPERTY:
             $property_key = $xaction->getMetadataValue(PhortunePaymentProviderConfigTransaction::PROPERTY_KEY);
             $object->setMetadataValue($property_key, $xaction->getNewValue());
             return;
         case PhortunePaymentProviderConfigTransaction::TYPE_ENABLE:
             return $object->setIsEnabled((int) $xaction->getNewValue());
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #18
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneCartTransaction::TYPE_CREATED:
         case PhortuneCartTransaction::TYPE_PURCHASED:
         case PhortuneCartTransaction::TYPE_HOLD:
         case PhortuneCartTransaction::TYPE_REVIEW:
         case PhortuneCartTransaction::TYPE_CANCEL:
         case PhortuneCartTransaction::TYPE_REFUND:
         case PhortuneCartTransaction::TYPE_INVOICED:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $new = $xaction->getNewValue();
     switch ($xaction->getTransactionType()) {
         case PhabricatorMetaMTAApplicationEmailTransaction::TYPE_ADDRESS:
             $object->setAddress($new);
             return;
         case PhabricatorMetaMTAApplicationEmailTransaction::TYPE_CONFIG:
             $key = $xaction->getMetadataValue(PhabricatorMetaMTAApplicationEmailTransaction::KEY_CONFIG);
             $object->setConfigValue($key, $new);
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HarbormasterBuildStepTransaction::TYPE_CREATE:
             return;
         case HarbormasterBuildStepTransaction::TYPE_NAME:
             return $object->setName($xaction->getNewValue());
         case HarbormasterBuildStepTransaction::TYPE_DEPENDS_ON:
             return $object->setDetail('dependsOn', $xaction->getNewValue());
         case HarbormasterBuildStepTransaction::TYPE_DESCRIPTION:
             return $object->setDescription($xaction->getNewValue());
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #21
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhameBlogTransaction::TYPE_NAME:
             return $object->setName($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_DESCRIPTION:
             return $object->setDescription($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_DOMAIN:
             return $object->setDomain($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_STATUS:
             return $object->setStatus($xaction->getNewValue());
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $setting_key = $xaction->getMetadataValue(PhabricatorUserPreferencesTransaction::PROPERTY_SETTING);
     switch ($xaction->getTransactionType()) {
         case PhabricatorUserPreferencesTransaction::TYPE_SETTING:
             $new_value = $xaction->getNewValue();
             if ($new_value === null) {
                 $object->unsetPreference($setting_key);
             } else {
                 $object->setPreference($setting_key, $new_value);
             }
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorProjectColumnTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorProjectColumnTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
         case PhabricatorProjectColumnTransaction::TYPE_LIMIT:
             $object->setPointLimit($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #24
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorPasteTransaction::TYPE_CONTENT:
             $object->setFilePHID($xaction->getNewValue());
             return;
         case PhabricatorPasteTransaction::TYPE_TITLE:
             $object->setTitle($xaction->getNewValue());
             return;
         case PhabricatorPasteTransaction::TYPE_LANGUAGE:
             $object->setLanguage($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorOAuthServerTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorOAuthServerTransaction::TYPE_REDIRECT_URI:
             $object->setRedirectURI($xaction->getNewValue());
             return;
         case PhabricatorOAuthServerTransaction::TYPE_DISABLED:
             $object->setIsDisabled($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #26
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneProductTransaction::TYPE_NAME:
             $object->setProductName($xaction->getNewValue());
             return;
         case PhortuneProductTransaction::TYPE_TYPE:
             $object->setProductType($xaction->getNewValue());
             return;
         case PhortuneProductTransaction::TYPE_PRICE:
             $object->setPriceInCents($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $type = $xaction->getTransactionType();
     switch ($type) {
         case PhabricatorCountdownTransaction::TYPE_TITLE:
             $object->setTitle($xaction->getNewValue());
             return;
         case PhabricatorCountdownTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
         case PhabricatorCountdownTransaction::TYPE_EPOCH:
             $object->setEpoch($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 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;
         case PhabricatorProfilePanelConfigurationTransaction::TYPE_ORDER:
             $object->setPanelOrder($xaction->getNewValue());
             return;
         case PhabricatorProfilePanelConfigurationTransaction::TYPE_VISIBILITY:
             $object->setVisibility($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
Пример #29
0
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case FundInitiativeTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
         case PhabricatorTransactions::TYPE_SUBSCRIBERS:
         case PhabricatorTransactions::TYPE_EDGE:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorPhurlURLTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorPhurlURLTransaction::TYPE_URL:
             $object->setLongURL($xaction->getNewValue());
             return;
         case PhabricatorPhurlURLTransaction::TYPE_ALIAS:
             $object->setAlias($xaction->getNewValue());
             return;
         case PhabricatorPhurlURLTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }