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


PHP PhabricatorProject::setHasWorkboard方法代码示例

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


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

示例1: buildInitializeContent

 private function buildInitializeContent(PhabricatorProject $project)
 {
     $request = $this->getRequest();
     $viewer = $this->getViewer();
     $type = $request->getStr('initialize-type');
     $id = $project->getID();
     $profile_uri = $this->getApplicationURI("profile/{$id}/");
     $board_uri = $this->getApplicationURI("board/{$id}/");
     $import_uri = $this->getApplicationURI("board/{$id}/import/");
     $set_default = $request->getBool('default');
     if ($set_default) {
         $this->getProfilePanelEngine()->adjustDefault(PhabricatorProject::PANEL_WORKBOARD);
     }
     if ($request->isFormPost()) {
         if ($type == 'backlog-only') {
             $column = PhabricatorProjectColumn::initializeNewColumn($viewer)->setSequence(0)->setProperty('isDefault', true)->setProjectPHID($project->getPHID())->save();
             $project->setHasWorkboard(1)->save();
             return id(new AphrontRedirectResponse())->setURI($board_uri);
         } else {
             return id(new AphrontRedirectResponse())->setURI($import_uri);
         }
     }
     $new_selector = id(new AphrontFormRadioButtonControl())->setLabel(pht('Columns'))->setName('initialize-type')->setValue('backlog-only')->addButton('backlog-only', pht('New Empty Board'), pht('Create a new board with just a backlog column.'))->addButton('import', pht('Import Columns'), pht('Import board columns from another project.'));
     $default_checkbox = id(new AphrontFormCheckboxControl())->setLabel(pht('Make Default'))->addCheckbox('default', 1, pht('Make the workboard the default view for this project.'), true);
     $form = id(new AphrontFormView())->setUser($viewer)->appendRemarkupInstructions(pht('The workboard for this project has not been created yet.'))->appendControl($new_selector)->appendControl($default_checkbox)->appendControl(id(new AphrontFormSubmitControl())->addCancelButton($profile_uri)->setValue(pht('Create Workboard')));
     $box = id(new PHUIObjectBoxView())->setHeaderText(pht('Create Workboard'))->setForm($form);
     return $box;
 }
开发者ID:billtt,项目名称:phabricator,代码行数:28,代码来源:PhabricatorProjectBoardViewController.php

示例2: addColumn

 private function addColumn(PhabricatorUser $viewer, PhabricatorProject $project, $sequence)
 {
     $project->setHasWorkboard(1)->save();
     return PhabricatorProjectColumn::initializeNewColumn($viewer)->setSequence(0)->setProperty('isDefault', $sequence == 0)->setProjectPHID($project->getPHID())->save();
 }
开发者ID:Houzz,项目名称:phabricator,代码行数:5,代码来源:PhabricatorProjectCoreTestCase.php


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