本文整理汇总了PHP中PhabricatorApplicationTransactionEditor::applyCustomInternalTransaction方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransactionEditor::applyCustomInternalTransaction方法的具体用法?PHP PhabricatorApplicationTransactionEditor::applyCustomInternalTransaction怎么用?PHP PhabricatorApplicationTransactionEditor::applyCustomInternalTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransactionEditor
的用法示例。
在下文中一共展示了PhabricatorApplicationTransactionEditor::applyCustomInternalTransaction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applyCustomInternalTransaction
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);
}
示例2: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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);
}
示例5: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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);
}
示例10: applyCustomInternalTransaction
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);
}
示例11: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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);
}
示例14: applyCustomInternalTransaction
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: applyCustomInternalTransaction
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);
}