示例#1
0
	/**
	 * @param $originalParentUser
	 * @return Pap_Common_User or null
	 */
	private function getParentSpillover(Pap_Common_User $originalParentUser) {
		$limit = 1;
		do {
			$this->initLimit($limit, $this->matrixWidth - 1 + $limit);
			$children = $this->userTree->getChildren($originalParentUser, $this->offset, $this->limit);
			if (count($children) > 0) {
				$this->initLimit($this->matrixWidth);
				$parent = $this->getParent($children, 1);
				$limit++;
				continue;
			}
			return null;
		} while ($parent === null);
		return $parent;
	}
 private function getChildAffilitesMails($parent){
     $tree = new Pap_Common_UserTree();
     $children = $tree->getChildren($parent);
     foreach($children as $child){
         $this->childAffiliates[] = $child->getEmail();
         $this->getChildAffilitesMails($child);
     }
 }