public function getChildrenDsIds($dsId, $level = 1)
    {
        $childrenDsIds = (array_key_exists($dsId, $this->childrenMap))
            ? $this->childrenMap[$dsId]
            : [];

        if (($level > 1) && count($childrenDsIds)) {
            $subChildDsIds = [$childrenDsIds];

            foreach ($childrenDsIds as $childDsId) {
                $subChildDsIds[] = $this->getChildrenDsIds($childDsId, $level - 1);
            }

            $childrenDsIds = call_user_func_array('array_merge', $subChildDsIds);
        }

        return $childrenDsIds;
    }
public function getChildrenDsIds($dsId, $level = 1)
    {
        $childrenDsIds = (array_key_exists($dsId, $this->childrenMap))
            ? $this->childrenMap[$dsId]
            : [];

        if (($level > 1) && count($childrenDsIds)) {
            $subChildDsIds = [$childrenDsIds];

            foreach ($childrenDsIds as $childDsId) {
                $subChildDsIds[] = $this->getChildrenDsIds($childDsId, $level - 1);
            }

            $childrenDsIds = call_user_func_array('array_merge', $subChildDsIds);
        }

        return $childrenDsIds;
    }
public function getChildrenDsIds ( $ dsId , $ level = 1 ) { $ childrenDsIds = ( array_key_exists ( $ dsId , $ this -> childrenMap ) ) ? $ this -> childrenMap [ $ dsId ] : [ ] ; if ( ( $ level > 1 ) && count ( $ childrenDsIds ) ) { $ subChildDsIds = [ $ childrenDsIds ] ; foreach ( $ childrenDsIds as $ childDsId ) { $ subChildDsIds [ ] = $ this -> getChildrenDsIds ( $ childDsId , $ level - 1 ) ; } $ childrenDsIds = call_user_func_array ( 'array_merge' , $ subChildDsIds ) ; } return $ childrenDsIds ; }
Get ds_id of children.

@param string $dsId  ds_id of node to fetch children
@param int    $level (Optional) recursion depth

@return array
Get ds_id of children .