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


PHP PhabricatorProject::initializeNewProject方法代码示例

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


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

示例1: generate

 public function generate()
 {
     $title = $this->generateTitle();
     // Prepend or append 'Sprint'
     $title = mt_rand(0, 1) ? $title . ' Sprint' : 'Sprint ' . $title;
     $author = $this->loadPhabrictorUser();
     $authorPHID = $author->getPHID();
     $project = PhabricatorProject::initializeNewProject($author);
     $this->addTransaction(PhabricatorProjectTransaction::TYPE_NAME, $title);
     $this->addTransaction(PhabricatorProjectTransaction::TYPE_ICON, 'fa-briefcase');
     $this->addTransaction(PhabricatorProjectTransaction::TYPE_COLOR, 'blue');
     // $this->addTransaction(
     //   PhabricatorProjectTransaction::TYPE_MEMBERS,
     //   $this->loadMembersWithAuthor($authorPHID));
     $this->addTransaction(PhabricatorTransactions::TYPE_VIEW_POLICY, PhabricatorPolicies::POLICY_PUBLIC);
     $this->addTransaction(PhabricatorTransactions::TYPE_EDIT_POLICY, PhabricatorPolicies::POLICY_PUBLIC);
     $this->addTransaction(PhabricatorTransactions::TYPE_JOIN_POLICY, PhabricatorPolicies::POLICY_PUBLIC);
     // Pick a date to be the start date for the sprint
     // Random between 4 weeks ago and one week from now
     $start = mt_rand(time() - 28 * 24 * 60 * 60, time() + 7 * 24 * 60 * 60);
     $this->xactions[] = id(new ManiphestTransaction())->setTransactionType(PhabricatorTransactions::TYPE_CUSTOMFIELD)->setMetadataValue('customfield:key', 'isdc:sprint:startdate')->setOldValue(null)->setNewValue($start);
     // Pick a date to be the end date for the sprint
     // Sprint is between 3 days and 3 weeks long
     $end = $start + mt_rand(3 * 24 * 60 * 60, 21 * 24 * 60 * 60);
     $this->xactions[] = id(new ManiphestTransaction())->setTransactionType(PhabricatorTransactions::TYPE_CUSTOMFIELD)->setMetadataValue('customfield:key', 'isdc:sprint:enddate')->setOldValue(null)->setNewValue($end);
     $editor = id(new PhabricatorProjectTransactionEditor())->setActor($author)->setContentSource(PhabricatorContentSource::newConsoleSource())->setContinueOnNoEffect(true)->setContinueOnMissingFields(true)->applyTransactions($project, $this->xactions);
     $project->save();
     // Generate a bunch of tasks created the before the sprint starts
     for ($i = 0, $num = mt_rand(5, 40); $i <= $num; $i++) {
         echo ".";
         $this->generateTask($project, $start, $end);
     }
     return $project;
 }
开发者ID:yangming85,项目名称:phabricator-sprint,代码行数:34,代码来源:BurndownTestDataGenerator.php

示例2: newEditableObject

 protected function newEditableObject()
 {
     $project = PhabricatorProject::initializeNewProject($this->getViewer());
     $milestone = $this->getMilestoneProject();
     if ($milestone) {
         $default_name = pht('Milestone %s', new PhutilNumber($milestone->loadNextMilestoneNumber()));
         $project->setName($default_name);
     }
     return $project;
 }
开发者ID:rochmit10,项目名称:phabricator,代码行数:10,代码来源:PhabricatorProjectEditEngine.php

示例3: testProjectPolicyMembership

 public function testProjectPolicyMembership()
 {
     $author = $this->generateNewTestUser();
     $proj_a = PhabricatorProject::initializeNewProject($author)->setName('A')->save();
     $proj_b = PhabricatorProject::initializeNewProject($author)->setName('B')->save();
     $proj_a->setViewPolicy($proj_b->getPHID())->save();
     $proj_b->setViewPolicy($proj_a->getPHID())->save();
     $user = new PhabricatorUser();
     $results = id(new PhabricatorProjectQuery())->setViewer($user)->execute();
     $this->assertEqual(0, count($results));
 }
开发者ID:truSense,项目名称:phabricator,代码行数:11,代码来源:PhabricatorPolicyDataTestCase.php

示例4: addProject

function addProject($project_name)
{
    $user = getAdmin();
    $project = PhabricatorProject::initializeNewProject($user);
    $xactions = array();
    # set name
    $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_NAME)->setNewValue($project_name);
    # set members
    $members = array();
    $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_EDGE)->setMetadataValue('edge:type', PhabricatorProjectProjectHasMemberEdgeType::EDGECONST)->setNewValue(array('+' => array_fuse($members)));
    $editor = id(new PhabricatorProjectTransactionEditor())->setActor($user)->setContinueOnNoEffect(true)->setContentSourceFromConduitRequest(new ConduitAPIRequest(array()));
    $editor->applyTransactions($project, $xactions);
}
开发者ID:Wenzel,项目名称:kde-phabricator-import,代码行数:13,代码来源:test.php

示例5: processRequest

 public function processRequest()
 {
     $request = $this->getRequest();
     $user = $request->getUser();
     $this->requireApplicationCapability(ProjectCreateProjectsCapability::CAPABILITY);
     $project = PhabricatorProject::initializeNewProject($user);
     $e_name = true;
     $type_name = PhabricatorProjectTransaction::TYPE_NAME;
     $v_name = $project->getName();
     $validation_exception = null;
     if ($request->isFormPost()) {
         $xactions = array();
         $v_name = $request->getStr('name');
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_name)->setNewValue($v_name);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_EDGE)->setMetadataValue('edge:type', PhabricatorEdgeConfig::TYPE_PROJ_MEMBER)->setNewValue(array('+' => array($user->getPHID() => $user->getPHID())));
         $editor = id(new PhabricatorProjectTransactionEditor())->setActor($user)->setContinueOnNoEffect(true)->setContentSourceFromRequest($request);
         try {
             $editor->applyTransactions($project, $xactions);
             if ($request->isAjax()) {
                 return id(new AphrontAjaxResponse())->setContent(array('phid' => $project->getPHID(), 'name' => $project->getName()));
             } else {
                 return id(new AphrontRedirectResponse())->setURI('/project/view/' . $project->getID() . '/');
             }
         } catch (PhabricatorApplicationTransactionValidationException $ex) {
             $validation_exception = $ex;
             $e_name = $ex->getShortMessage($type_name);
         }
     }
     if ($request->isAjax()) {
         $form = new PHUIFormLayoutView();
     } else {
         $form = new AphrontFormView();
         $form->setUser($user);
     }
     $form->appendChild(id(new AphrontFormTextControl())->setLabel(pht('Name'))->setName('name')->setValue($v_name)->setError($e_name));
     if ($request->isAjax()) {
         $errors = array();
         if ($validation_exception) {
             $errors = mpull($ex->getErrors(), 'getMessage');
         }
         $dialog = id(new AphrontDialogView())->setUser($user)->setWidth(AphrontDialogView::WIDTH_FORM)->setTitle(pht('Create a New Project'))->setErrors($errors)->appendChild($form)->addSubmitButton(pht('Create Project'))->addCancelButton('/project/');
         return id(new AphrontDialogResponse())->setDialog($dialog);
     } else {
         $form->appendChild(id(new AphrontFormSubmitControl())->setValue(pht('Create'))->addCancelButton('/project/'));
         $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
         $crumbs->addTextCrumb(pht('Create Project'), $this->getApplicationURI() . 'create/');
         $form_box = id(new PHUIObjectBoxView())->setHeaderText(pht('Create New Project'))->setValidationException($validation_exception)->setForm($form);
         return $this->buildApplicationPage(array($crumbs, $form_box), array('title' => pht('Create New Project')));
     }
 }
开发者ID:denghp,项目名称:phabricator,代码行数:50,代码来源:PhabricatorProjectCreateController.php

示例6: execute

 protected function execute(ConduitAPIRequest $request)
 {
     $user = $request->getUser();
     $this->requireApplicationCapability(ProjectCreateProjectsCapability::CAPABILITY, $user);
     $project = PhabricatorProject::initializeNewProject($user);
     $type_name = PhabricatorProjectTransaction::TYPE_NAME;
     $members = $request->getValue('members');
     $xactions = array();
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_name)->setNewValue($request->getValue('name'));
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_EDGE)->setMetadataValue('edge:type', PhabricatorEdgeConfig::TYPE_PROJ_MEMBER)->setNewValue(array('+' => array_fuse($members)));
     $editor = id(new PhabricatorProjectTransactionEditor())->setActor($user)->setContinueOnNoEffect(true)->setContentSourceFromConduitRequest($request);
     $editor->applyTransactions($project, $xactions);
     return $this->buildProjectInfoDictionary($project);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:14,代码来源:ProjectCreateConduitAPIMethod.php

示例7: generate

 public function generate()
 {
     $title = $this->generateTitle();
     $author = $this->loadPhabrictorUser();
     $author_phid = $author->getPHID();
     $project = PhabricatorProject::initializeNewProject($author)->setName($title);
     $this->addTransaction(PhabricatorProjectTransaction::TYPE_NAME, $title);
     $project->attachMemberPHIDs($this->loadMembersWithAuthor($author_phid));
     $this->addTransaction(PhabricatorProjectTransaction::TYPE_STATUS, $this->generateProjectStatus());
     $this->addTransaction(PhabricatorTransactions::TYPE_VIEW_POLICY, PhabricatorPolicies::POLICY_PUBLIC);
     $this->addTransaction(PhabricatorTransactions::TYPE_EDIT_POLICY, PhabricatorPolicies::POLICY_PUBLIC);
     $this->addTransaction(PhabricatorTransactions::TYPE_JOIN_POLICY, PhabricatorPolicies::POLICY_PUBLIC);
     $editor = id(new PhabricatorProjectTransactionEditor())->setActor($author)->setContentSource(PhabricatorContentSource::newConsoleSource())->setContinueOnNoEffect(true)->applyTransactions($project, $this->xactions);
     return $project->save();
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:15,代码来源:PhabricatorProjectTestDataGenerator.php

示例8: execute

 protected function execute(ConduitAPIRequest $request)
 {
     $user = $request->getUser();
     $this->requireApplicationCapability(ProjectCreateProjectsCapability::CAPABILITY, $user);
     $project = PhabricatorProject::initializeNewProject($user);
     $type_name = PhabricatorProjectTransaction::TYPE_NAME;
     $members = $request->getValue('members');
     $xactions = array();
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_name)->setNewValue($request->getValue('name'));
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_EDGE)->setMetadataValue('edge:type', PhabricatorProjectProjectHasMemberEdgeType::EDGECONST)->setNewValue(array('+' => array_fuse($members)));
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_ICON)->setNewValue('fa-calendar');
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_COLOR)->setNewValue('green');
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_CUSTOMFIELD)->setMetadataValue('customfield:key', 'isdc:sprint:issprint')->setOldValue(null)->setNewValue(1);
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_CUSTOMFIELD)->setMetadataValue('customfield:key', 'isdc:sprint:startdate')->setOldValue(null)->setNewValue(strtotime($request->getValue('startdate')));
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_CUSTOMFIELD)->setMetadataValue('customfield:key', 'isdc:sprint:enddate')->setOldValue(0)->setNewValue(strtotime($request->getValue('enddate')));
     $editor = id(new PhabricatorProjectTransactionEditor())->setActor($user)->setContinueOnNoEffect(true)->setContentSourceFromConduitRequest($request);
     $editor->applyTransactions($project, $xactions);
     return $this->buildProjectInfoDictionary($project);
 }
开发者ID:yangming85,项目名称:phabricator-extensions-Sprint,代码行数:19,代码来源:SprintCreateConduitAPIMethod.php

示例9: generateObject

 public function generateObject()
 {
     $author = $this->loadRandomUser();
     $project = PhabricatorProject::initializeNewProject($author);
     $xactions = array();
     $xactions[] = $this->newTransaction(PhabricatorProjectTransaction::TYPE_NAME, $this->newProjectTitle());
     $xactions[] = $this->newTransaction(PhabricatorProjectTransaction::TYPE_STATUS, $this->newProjectStatus());
     // Almost always make the author a member.
     $members = array();
     if ($this->roll(1, 20) > 2) {
         $members[] = $author->getPHID();
     }
     // Add a few other members.
     $size = $this->roll(2, 6, -2);
     for ($ii = 0; $ii < $size; $ii++) {
         $members[] = $this->loadRandomUser()->getPHID();
     }
     $xactions[] = $this->newTransaction(PhabricatorTransactions::TYPE_EDGE, array('+' => array_fuse($members)), array('edge:type' => PhabricatorProjectProjectHasMemberEdgeType::EDGECONST));
     $editor = id(new PhabricatorProjectTransactionEditor())->setActor($author)->setContentSource($this->getLipsumContentSource())->setContinueOnNoEffect(true)->applyTransactions($project, $xactions);
     return $project;
 }
开发者ID:thincal,项目名称:phabricator,代码行数:21,代码来源:PhabricatorProjectTestDataGenerator.php

示例10: createProject

 private function createProject(PhabricatorUser $user, PhabricatorProject $parent = null, $is_milestone = false)
 {
     $project = PhabricatorProject::initializeNewProject($user);
     $name = pht('Test Project %d', mt_rand());
     $xactions = array();
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_NAME)->setNewValue($name);
     if ($parent) {
         if ($is_milestone) {
             $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_MILESTONE)->setNewValue($parent->getPHID());
         } else {
             $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_PARENT)->setNewValue($parent->getPHID());
         }
     }
     $this->applyTransactions($project, $user, $xactions);
     return $project;
 }
开发者ID:sanjid133,项目名称:phabricator,代码行数:16,代码来源:PhabricatorProjectCoreTestCase.php

示例11: createProject

 private function createProject(PhabricatorUser $user, PhabricatorProject $parent = null, $is_milestone = false)
 {
     $project = PhabricatorProject::initializeNewProject($user);
     $name = pht('Test Project %d', mt_rand());
     $xactions = array();
     $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_NAME)->setNewValue($name);
     if ($parent) {
         if ($is_milestone) {
             $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_MILESTONE)->setNewValue($parent->getPHID());
         } else {
             $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorProjectTransaction::TYPE_PARENT)->setNewValue($parent->getPHID());
         }
     }
     $this->applyTransactions($project, $user, $xactions);
     // Force these values immediately; they are normally updated by the
     // index engine.
     if ($parent) {
         if ($is_milestone) {
             $parent->setHasMilestones(1)->save();
         } else {
             $parent->setHasSubprojects(1)->save();
         }
     }
     return $project;
 }
开发者ID:Houzz,项目名称:phabricator,代码行数:25,代码来源:PhabricatorProjectCoreTestCase.php

示例12: createProject

 private function createProject(PhabricatorUser $user)
 {
     $project = PhabricatorProject::initializeNewProject($user);
     $project->setName(pht('Test Project %d', mt_rand()));
     $project->save();
     return $project;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:7,代码来源:PhabricatorProjectEditorTestCase.php

示例13: createProject

 private function createProject(PhabricatorUser $viewer)
 {
     $project = PhabricatorProject::initializeNewProject($viewer);
     $project->setName('Test Project ' . mt_rand());
     return $project;
 }
开发者ID:yangming85,项目名称:phabricator-extensions-Sprint,代码行数:6,代码来源:SprintQueryTest.php

示例14: newEditableObject

 protected function newEditableObject()
 {
     return PhabricatorProject::initializeNewProject($this->getViewer());
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:4,代码来源:PhabricatorProjectEditEngine.php

示例15: processRequest

 public function processRequest()
 {
     $request = $this->getRequest();
     $viewer = $request->getUser();
     if ($this->id) {
         $id = $request->getURIData('id');
         $is_new = false;
         $project = id(new PhabricatorProjectQuery())->setViewer($viewer)->withIDs(array($this->id))->needSlugs(true)->needImages(true)->requireCapabilities(array(PhabricatorPolicyCapability::CAN_VIEW, PhabricatorPolicyCapability::CAN_EDIT))->executeOne();
         if (!$project) {
             return new Aphront404Response();
         }
     } else {
         $is_new = true;
         $this->requireApplicationCapability(ProjectCreateProjectsCapability::CAPABILITY);
         $project = PhabricatorProject::initializeNewProject($viewer);
     }
     $field_list = PhabricatorCustomField::getObjectFields($project, PhabricatorCustomField::ROLE_EDIT);
     $field_list->setViewer($viewer)->readFieldsFromStorage($project);
     $e_name = true;
     $e_slugs = false;
     $e_edit = null;
     $v_name = $project->getName();
     $project_slugs = $project->getSlugs();
     $project_slugs = mpull($project_slugs, 'getSlug', 'getSlug');
     $v_primary_slug = $project->getPrimarySlug();
     unset($project_slugs[$v_primary_slug]);
     $v_slugs = $project_slugs;
     $v_color = $project->getColor();
     $v_icon = $project->getIcon();
     $v_locked = $project->getIsMembershipLocked();
     $validation_exception = null;
     if ($request->isFormPost()) {
         $e_name = null;
         $e_slugs = null;
         $v_name = $request->getStr('name');
         $v_slugs = $request->getStrList('slugs');
         $v_view = $request->getStr('can_view');
         $v_edit = $request->getStr('can_edit');
         $v_join = $request->getStr('can_join');
         $v_color = $request->getStr('color');
         $v_icon = $request->getStr('icon');
         $v_locked = $request->getInt('is_membership_locked', 0);
         $type_name = PhabricatorProjectTransaction::TYPE_NAME;
         $type_slugs = PhabricatorProjectTransaction::TYPE_SLUGS;
         $type_edit = PhabricatorTransactions::TYPE_EDIT_POLICY;
         $type_icon = PhabricatorProjectTransaction::TYPE_ICON;
         $type_color = PhabricatorProjectTransaction::TYPE_COLOR;
         $type_locked = PhabricatorProjectTransaction::TYPE_LOCKED;
         $xactions = array();
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_name)->setNewValue($v_name);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_slugs)->setNewValue($v_slugs);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_VIEW_POLICY)->setNewValue($v_view);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_edit)->setNewValue($v_edit);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_JOIN_POLICY)->setNewValue($v_join);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_icon)->setNewValue($v_icon);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_color)->setNewValue($v_color);
         $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType($type_locked)->setNewValue($v_locked);
         $xactions = array_merge($xactions, $field_list->buildFieldTransactionsFromRequest(new PhabricatorProjectTransaction(), $request));
         $editor = id(new PhabricatorProjectTransactionEditor())->setActor($viewer)->setContentSourceFromRequest($request)->setContinueOnNoEffect(true);
         if ($is_new) {
             $xactions[] = id(new PhabricatorProjectTransaction())->setTransactionType(PhabricatorTransactions::TYPE_EDGE)->setMetadataValue('edge:type', PhabricatorProjectProjectHasMemberEdgeType::EDGECONST)->setNewValue(array('+' => array($viewer->getPHID() => $viewer->getPHID())));
         }
         try {
             $editor->applyTransactions($project, $xactions);
             if ($request->isAjax()) {
                 return id(new AphrontAjaxResponse())->setContent(array('phid' => $project->getPHID(), 'name' => $project->getName()));
             }
             $redirect_uri = $this->getApplicationURI('profile/' . $project->getID() . '/');
             return id(new AphrontRedirectResponse())->setURI($redirect_uri);
         } catch (PhabricatorApplicationTransactionValidationException $ex) {
             $validation_exception = $ex;
             $e_name = $ex->getShortMessage($type_name);
             $e_slugs = $ex->getShortMessage($type_slugs);
             $e_edit = $ex->getShortMessage($type_edit);
             $project->setViewPolicy($v_view);
             $project->setEditPolicy($v_edit);
             $project->setJoinPolicy($v_join);
         }
     }
     if ($is_new) {
         $header_name = pht('Create a New Project');
         $title = pht('Create Project');
     } else {
         $header_name = pht('Edit Project');
         $title = pht('Edit Project');
     }
     $policies = id(new PhabricatorPolicyQuery())->setViewer($viewer)->setObject($project)->execute();
     $v_slugs = implode(', ', $v_slugs);
     $form = id(new AphrontFormView())->setUser($viewer)->appendChild(id(new AphrontFormTextControl())->setLabel(pht('Name'))->setName('name')->setValue($v_name)->setError($e_name));
     $field_list->appendFieldsToForm($form);
     $shades = PhabricatorProjectIcon::getColorMap();
     if ($is_new) {
         $icon_uri = $this->getApplicationURI('icon/');
     } else {
         $icon_uri = $this->getApplicationURI('icon/' . $project->getID() . '/');
     }
     $icon_display = PhabricatorProjectIcon::renderIconForChooser($v_icon);
     list($can_lock, $lock_message) = $this->explainApplicationCapability(ProjectCanLockProjectsCapability::CAPABILITY, pht('You can update the Lock Project setting.'), pht('You can not update the Lock Project setting.'));
     $form->appendChild(id(new AphrontFormChooseButtonControl())->setLabel(pht('Icon'))->setName('icon')->setDisplayValue($icon_display)->setButtonText(pht('Choose Icon...'))->setChooseURI($icon_uri)->setValue($v_icon))->appendChild(id(new AphrontFormSelectControl())->setLabel(pht('Color'))->setName('color')->setValue($v_color)->setOptions($shades));
     if (!$is_new) {
//.........这里部分代码省略.........
开发者ID:hrb518,项目名称:phabricator,代码行数:101,代码来源:PhabricatorProjectEditDetailsController.php


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