當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PhabricatorLiskDAO::setStatus方法代碼示例

本文整理匯總了PHP中PhabricatorLiskDAO::setStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorLiskDAO::setStatus方法的具體用法?PHP PhabricatorLiskDAO::setStatus怎麽用?PHP PhabricatorLiskDAO::setStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PhabricatorLiskDAO的用法示例。


在下文中一共展示了PhabricatorLiskDAO::setStatus方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $type = $xaction->getTransactionType();
     switch ($type) {
         case FundInitiativeTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_RISKS:
             $object->setRisks($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_MERCHANT:
             $object->setMerchantPHID($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
         case FundInitiativeTransaction::TYPE_BACKER:
         case FundInitiativeTransaction::TYPE_REFUND:
             $amount = $xaction->getMetadataValue(FundInitiativeTransaction::PROPERTY_AMOUNT);
             $amount = PhortuneCurrency::newFromString($amount);
             if ($type == FundInitiativeTransaction::TYPE_REFUND) {
                 $total = $object->getTotalAsCurrency()->subtract($amount);
             } else {
                 $total = $object->getTotalAsCurrency()->add($amount);
             }
             $object->setTotalAsCurrency($total);
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:33,代碼來源:FundInitiativeEditor.php

示例2: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorProjectTransaction::TYPE_NAME:
             $name = $xaction->getNewValue();
             $object->setName($name);
             $object->setPrimarySlug(PhabricatorSlug::normalizeProjectSlug($name));
             return;
         case PhabricatorProjectTransaction::TYPE_SLUGS:
             return;
         case PhabricatorProjectTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_IMAGE:
             $object->setProfileImagePHID($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_ICON:
             $object->setIcon($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_COLOR:
             $object->setColor($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_LOCKED:
             $object->setIsMembershipLocked($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
開發者ID:patelhardik,項目名稱:phabricator,代碼行數:28,代碼來源:PhabricatorProjectTransactionEditor.php

示例3: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorProjectTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             $object->setPhrictionSlug($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_SLUGS:
             return;
         case PhabricatorProjectTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_IMAGE:
             $object->setProfileImagePHID($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_ICON:
             $object->setIcon($xaction->getNewValue());
             return;
         case PhabricatorProjectTransaction::TYPE_COLOR:
             $object->setColor($xaction->getNewValue());
             return;
         case PhabricatorTransactions::TYPE_EDGE:
             return;
         case PhabricatorTransactions::TYPE_VIEW_POLICY:
             $object->setViewPolicy($xaction->getNewValue());
             return;
         case PhabricatorTransactions::TYPE_EDIT_POLICY:
             $object->setEditPolicy($xaction->getNewValue());
             return;
         case PhabricatorTransactions::TYPE_JOIN_POLICY:
             $object->setJoinPolicy($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:35,代碼來源:PhabricatorProjectTransactionEditor.php

示例4: 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);
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:25,代碼來源:PhabricatorBadgesEditor.php

示例5: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorDashboardTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorDashboardTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
         case PhabricatorDashboardTransaction::TYPE_LAYOUT_MODE:
             $old_layout = $object->getLayoutConfigObject();
             $new_layout = clone $old_layout;
             $new_layout->setLayoutMode($xaction->getNewValue());
             if ($old_layout->isMultiColumnLayout() != $new_layout->isMultiColumnLayout()) {
                 $panel_phids = $object->getPanelPHIDs();
                 $new_locations = $new_layout->getDefaultPanelLocations();
                 foreach ($panel_phids as $panel_phid) {
                     $new_locations[0][] = $panel_phid;
                 }
                 $new_layout->setPanelLocations($new_locations);
             }
             $object->setLayoutConfigFromObject($new_layout);
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:26,代碼來源:PhabricatorDashboardTransactionEditor.php

示例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);
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:9,代碼來源:FundBackerEditor.php

示例7: applyCustomInternalTransaction

 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);
 }
開發者ID:MenZil-Team,項目名稱:phabricator,代碼行數:14,代碼來源:PhameBlogEditor.php

示例8: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PonderAnswerTransaction::TYPE_CONTENT:
             $object->setContent($xaction->getNewValue());
             break;
         case PonderAnswerTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             break;
         case PonderAnswerTransaction::TYPE_QUESTION_ID:
             $object->setQuestionID($xaction->getNewValue());
             break;
     }
 }
開發者ID:ryancford,項目名稱:phabricator,代碼行數:14,代碼來源:PonderAnswerEditor.php

示例9: applyCustomInternalTransaction

 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);
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:15,代碼來源:PhabricatorProjectColumnTransactionEditor.php

示例10: applyCustomInternalTransaction

 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);
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:18,代碼來源:FundInitiativeEditor.php

示例11: applyCustomInternalTransaction

 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;
         case PhabricatorPasteTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
開發者ID:fengshao0907,項目名稱:phabricator,代碼行數:18,代碼來源:PhabricatorPasteEditor.php

示例12: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case ManiphestTransaction::TYPE_PRIORITY:
             return $object->setPriority($xaction->getNewValue());
         case ManiphestTransaction::TYPE_STATUS:
             return $object->setStatus($xaction->getNewValue());
         case ManiphestTransaction::TYPE_TITLE:
             return $object->setTitle($xaction->getNewValue());
         case ManiphestTransaction::TYPE_DESCRIPTION:
             return $object->setDescription($xaction->getNewValue());
         case ManiphestTransaction::TYPE_OWNER:
             $phid = $xaction->getNewValue();
             // Update the "ownerOrdering" column to contain the full name of the
             // owner, if the task is assigned.
             $handle = null;
             if ($phid) {
                 $handle = id(new PhabricatorHandleQuery())->setViewer($this->getActor())->withPHIDs(array($phid))->executeOne();
             }
             if ($handle) {
                 $object->setOwnerOrdering($handle->getName());
             } else {
                 $object->setOwnerOrdering(null);
             }
             return $object->setOwnerPHID($phid);
         case ManiphestTransaction::TYPE_SUBPRIORITY:
             $object->setSubpriority($xaction->getNewValue());
             return;
         case ManiphestTransaction::TYPE_PROJECT_COLUMN:
             // these do external (edge) updates
             return;
         case ManiphestTransaction::TYPE_MERGED_INTO:
             $object->setStatus(ManiphestTaskStatus::getDuplicateStatus());
             return;
         case ManiphestTransaction::TYPE_MERGED_FROM:
             return;
     }
 }
開發者ID:miaokuan,項目名稱:phabricator,代碼行數:38,代碼來源:ManiphestTransactionEditor.php

示例13: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PholioTransactionType::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             if ($object->getOriginalName() === null) {
                 $object->setOriginalName($xaction->getNewValue());
             }
             break;
         case PholioTransactionType::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             break;
         case PholioTransactionType::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             break;
         case PhabricatorTransactions::TYPE_EDGE:
             return;
     }
 }
開發者ID:denghp,項目名稱:phabricator,代碼行數:19,代碼來源:PholioMockEditor.php

示例14: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorOwnersPackageTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorOwnersPackageTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
         case PhabricatorOwnersPackageTransaction::TYPE_AUDITING:
             $object->setAuditingEnabled($xaction->getNewValue());
             return;
         case PhabricatorOwnersPackageTransaction::TYPE_OWNERS:
         case PhabricatorOwnersPackageTransaction::TYPE_PATHS:
             return;
         case PhabricatorOwnersPackageTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
開發者ID:AbhishekGhosh,項目名稱:phabricator,代碼行數:21,代碼來源:PhabricatorOwnersPackageTransactionEditor.php

示例15: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhrictionTransaction::TYPE_TITLE:
         case PhrictionTransaction::TYPE_CONTENT:
         case PhrictionTransaction::TYPE_MOVE_TO:
             $object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS);
             return;
         case PhrictionTransaction::TYPE_MOVE_AWAY:
             $object->setStatus(PhrictionDocumentStatus::STATUS_MOVED);
             return;
         case PhrictionTransaction::TYPE_DELETE:
             $object->setStatus(PhrictionDocumentStatus::STATUS_DELETED);
             return;
     }
 }
開發者ID:endlessm,項目名稱:phabricator,代碼行數:16,代碼來源:PhrictionTransactionEditor.php


注:本文中的PhabricatorLiskDAO::setStatus方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。