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


PHP PhabricatorLiskDAO::setName方法代码示例

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


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

示例1: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorEditEngineConfigurationTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_PREAMBLE:
             $object->setPreamble($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_ORDER:
             $object->setFieldOrder($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_DEFAULT:
             $field_key = $xaction->getMetadataValue('field.key');
             $object->setFieldDefault($field_key, $xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_LOCKS:
             $object->setFieldLocks($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_DEFAULTCREATE:
             $object->setIsDefault($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_DISABLE:
             $object->setIsDisabled($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:28,代码来源:PhabricatorEditEngineConfigurationEditor.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)
 {
     $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

示例4: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhameBlogTransaction::TYPE_NAME:
             return $object->setName($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_SUBTITLE:
             return $object->setSubtitle($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_DESCRIPTION:
             return $object->setDescription($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_FULLDOMAIN:
             $new_value = $xaction->getNewValue();
             if (strlen($new_value)) {
                 $uri = new PhutilURI($new_value);
                 $domain = $uri->getDomain();
                 $object->setDomain($domain);
             } else {
                 $object->setDomain(null);
             }
             $object->setDomainFullURI($new_value);
             return;
         case PhameBlogTransaction::TYPE_PROFILEIMAGE:
             return $object->setProfileImagePHID($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_HEADERIMAGE:
             return $object->setHeaderImagePHID($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_STATUS:
             return $object->setStatus($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_PARENTSITE:
             return $object->setParentSite($xaction->getNewValue());
         case PhameBlogTransaction::TYPE_PARENTDOMAIN:
             return $object->setParentDomain($xaction->getNewValue());
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:33,代码来源:PhameBlogEditor.php

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

示例6: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $value = $xaction->getNewValue();
     switch ($xaction->getTransactionType()) {
         case PhabricatorAuthSSHKeyTransaction::TYPE_NAME:
             $object->setName($value);
             return;
         case PhabricatorAuthSSHKeyTransaction::TYPE_KEY:
             $public_key = PhabricatorAuthSSHPublicKey::newFromRawKey($value);
             $type = $public_key->getType();
             $body = $public_key->getBody();
             $comment = $public_key->getComment();
             $object->setKeyType($type);
             $object->setKeyBody($body);
             $object->setKeyComment($comment);
             return;
         case PhabricatorAuthSSHKeyTransaction::TYPE_DEACTIVATE:
             if ($value) {
                 $new = null;
             } else {
                 $new = 1;
             }
             $object->setIsActive($new);
             return;
     }
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:26,代码来源:PhabricatorAuthSSHKeyEditor.php

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

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

示例9: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceQueueTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             break;
     }
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:8,代码来源:NuanceQueueEditor.php

示例10: 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);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:9,代码来源:AlmanacNetworkEditor.php

示例11: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceSourceTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             break;
         case NuanceSourceTransaction::TYPE_DEFAULT_QUEUE:
             $object->setDefaultQueuePHID($xaction->getNewValue());
             break;
     }
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:11,代码来源:NuanceSourceEditor.php

示例12: 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);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:11,代码来源:PhortuneAccountEditor.php

示例13: 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);
 }
开发者ID:truSense,项目名称:phabricator,代码行数:12,代码来源:PhortuneMerchantEditor.php

示例14: 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);
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:12,代码来源:HarbormasterBuildPlanEditor.php

示例15: 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);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:12,代码来源:PhabricatorDashboardPanelTransactionEditor.php


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