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


PHP Tracker_Artifact::setFormElementFactory方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $tracker_user_story_id = 103;
     $user_story_id = 107;
     $submitted_by = 102;
     $submitted_on = 1234567890;
     $use_artifact_permissions = false;
     $tracker = aMockTracker()->withId($this->tracker_id)->build();
     $this->layout = mock('Tracker_IDisplayTrackerLayout');
     $this->request = aRequest()->with('func', 'artifact-update')->build();
     $this->user = mock('PFUser');
     $this->formelement_factory = mock('Tracker_FormElementFactory');
     $this->hierarchy_factory = mock('Tracker_HierarchyFactory');
     $this->computed_field = mock('Tracker_FormElement_Field_Computed');
     $this->us_computed_field = mock('Tracker_FormElement_Field_Computed');
     $this->user_story = mock('Tracker_Artifact');
     $tracker_user_story = aMockTracker()->withId($tracker_user_story_id)->build();
     stub($this->user_story)->getTrackerId()->returns($tracker_user_story_id);
     stub($this->user_story)->getTracker()->returns($tracker_user_story);
     stub($this->user_story)->getId()->returns($user_story_id);
     $this->task = partial_mock('Tracker_Artifact', array('createNewChangeset'), array($this->artifact_id, $this->tracker_id, $submitted_by, $submitted_on, $use_artifact_permissions));
     $this->task->setHierarchyFactory($this->hierarchy_factory);
     $this->task->setTracker($tracker);
     $this->task->setFormElementFactory($this->formelement_factory);
     stub($this->task)->createNewChangeset()->returns(true);
     stub($this->formelement_factory)->getComputableFieldByNameForUser($tracker_user_story_id, Tracker::REMAINING_EFFORT_FIELD_NAME, $this->user)->returns($this->us_computed_field);
     stub($this->computed_field)->fetchCardValue($this->task)->returns(42);
     stub($this->us_computed_field)->fetchCardValue($this->user_story)->returns(23);
     $this->event_manager = mock('EventManager');
     $this->action = new Tracker_Action_UpdateArtifact($this->task, $this->formelement_factory, $this->event_manager);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:32,代码来源:UpdateArtifactTest.php

示例2: build

 public function build()
 {
     $artifact = new Tracker_Artifact($this->id, $this->tracker_id, null, null, null);
     if ($this->tracker) {
         $artifact->setTracker($this->tracker);
     }
     if ($this->formElementFactory) {
         $artifact->setFormElementFactory($this->formElementFactory);
     }
     if ($this->changesets) {
         $artifact->setChangesets($this->changesets);
     }
     if ($this->hierarchy_factory) {
         $artifact->setHierarchyFactory($this->hierarchy_factory);
     }
     if (isset($this->ancestors)) {
         $artifact->setAllAncestors($this->ancestors);
     }
     return $artifact;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:20,代码来源:anArtifact.php

示例3: build

 public function build()
 {
     $artifact = new Tracker_Artifact($this->id, $this->tracker_id, $this->submitted_by, $this->submitted_on, null);
     if ($this->tracker) {
         $artifact->setTracker($this->tracker);
     }
     if ($this->formElementFactory) {
         $artifact->setFormElementFactory($this->formElementFactory);
     }
     if ($this->changesets) {
         $artifact->setChangesets($this->changesets);
     }
     if ($this->hierarchy_factory) {
         $artifact->setHierarchyFactory($this->hierarchy_factory);
     }
     if (isset($this->ancestors)) {
         $artifact->setAllAncestors($this->ancestors);
     }
     if ($this->title) {
         $artifact->setTitle($this->title);
     }
     if ($this->parent_without_permission_checking) {
         $artifact->setParentWithoutPermissionChecking($this->parent_without_permission_checking);
     }
     if ($this->submitted_by_user) {
         $artifact->setSubmittedByUser($this->submitted_by_user);
     }
     foreach ($this->user_can_view as $user) {
         $artifact->setUserCanView($user, true);
     }
     return $artifact;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:32,代码来源:anArtifact.php


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