当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorLiskDAO::setOwnerPHID方法代码示例

本文整理汇总了PHP中PhabricatorLiskDAO::setOwnerPHID方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorLiskDAO::setOwnerPHID方法的具体用法?PHP PhabricatorLiskDAO::setOwnerPHID怎么用?PHP PhabricatorLiskDAO::setOwnerPHID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhabricatorLiskDAO的用法示例。


在下文中一共展示了PhabricatorLiskDAO::setOwnerPHID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceItemTransaction::TYPE_REQUESTOR:
             $object->setRequestorPHID($xaction->getNewValue());
             break;
         case NuanceItemTransaction::TYPE_SOURCE:
             $object->setSourcePHID($xaction->getNewValue());
             break;
         case NuanceItemTransaction::TYPE_OWNER:
             $object->setOwnerPHID($xaction->getNewValue());
             break;
     }
 }
开发者ID:denghp,项目名称:phabricator,代码行数:14,代码来源:NuanceItemEditor.php

示例2: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceItemTransaction::TYPE_REQUESTOR:
             $object->setRequestorPHID($xaction->getNewValue());
             break;
         case NuanceItemTransaction::TYPE_SOURCE:
             $object->setSourcePHID($xaction->getNewValue());
             break;
         case NuanceItemTransaction::TYPE_OWNER:
             $object->setOwnerPHID($xaction->getNewValue());
             break;
         case NuanceItemTransaction::TYPE_QUEUE:
             $object->setQueuePHID($xaction->getNewValue());
             break;
         case NuanceItemTransaction::TYPE_PROPERTY:
             $key = $xaction->getMetadataValue(NuanceItemTransaction::PROPERTY_KEY);
             $object->setNuanceProperty($key, $xaction->getNewValue());
             break;
     }
 }
开发者ID:pugong,项目名称:phabricator,代码行数:21,代码来源:NuanceItemEditor.php

示例3: 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

示例4: 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_MERGED_INTO:
             $object->setStatus(ManiphestTaskStatus::getDuplicateStatus());
             return;
         case ManiphestTransaction::TYPE_COVER_IMAGE:
             $file_phid = $xaction->getNewValue();
             if ($file_phid) {
                 $file = id(new PhabricatorFileQuery())->setViewer($this->getActor())->withPHIDs(array($file_phid))->executeOne();
             } else {
                 $file = null;
             }
             if (!$file || !$file->isTransformableImage()) {
                 $object->setProperty('cover.filePHID', null);
                 $object->setProperty('cover.thumbnailPHID', null);
                 return;
             }
             $xform_key = PhabricatorFileThumbnailTransform::TRANSFORM_WORKCARD;
             $xform = PhabricatorFileTransform::getTransformByKey($xform_key)->executeTransform($file);
             $object->setProperty('cover.filePHID', $file->getPHID());
             $object->setProperty('cover.thumbnailPHID', $xform->getPHID());
             return;
         case ManiphestTransaction::TYPE_POINTS:
             $object->setPoints($xaction->getNewValue());
             return;
         case ManiphestTransaction::TYPE_MERGED_FROM:
         case ManiphestTransaction::TYPE_PARENT:
         case PhabricatorTransactions::TYPE_COLUMNS:
             return;
     }
 }
开发者ID:vinzent,项目名称:phabricator,代码行数:57,代码来源:ManiphestTransactionEditor.php


注:本文中的PhabricatorLiskDAO::setOwnerPHID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。