本文整理汇总了PHP中Tracker::setChildren方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker::setChildren方法的具体用法?PHP Tracker::setChildren怎么用?PHP Tracker::setChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker::setChildren方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: itHasAllTriggeringFields
public function itHasAllTriggeringFields()
{
$child_tracker = aTracker()->withId(200)->build();
$this->target_tracker->setChildren(array($child_tracker));
expect($this->formelement_factory)->getUsedStaticSbFields()->count(2);
expect($this->formelement_factory)->getUsedStaticSbFields($child_tracker)->at(1);
stub($this->formelement_factory)->getUsedStaticSbFields()->returnsEmptyDar();
$this->factory->getForTracker($this->target_tracker);
}
示例2: build
/**
* @return \Tracker
*/
public function build()
{
$tracker = new Tracker($this->id, $this->project_id, $this->name, null, $this->item_name, null, null, null, null, null, null, null, null, null);
if ($this->project) {
$tracker->setProject($this->project);
}
if ($this->children !== null) {
$tracker->setChildren($this->children);
}
if ($this->parent !== false) {
$tracker->setParent($this->parent);
}
return $tracker;
}