is imediate Child of $item ?
182608
public function isChildOf(Geo $item){
        return ($this->left > $item->left) && ($this->right < $item->right) && ($this->depth == $item->depth+1);
    }
879848
public function add_child_item(cc_i_item &$item) {
        if (is_null($this->childitems)) {
            $this->childitems = array();
        }
        $this->childitems[$item->identifier] = $item;
    }
1187691
function () {
/*Line 32 - 'ChildEnumerator.js' */            this.item = this.nextItem;
/*Line 33 - 'ChildEnumerator.js' */            if (!this.item)
/*Line 34 - 'ChildEnumerator.js' */                return false;
/*Line 35 - 'ChildEnumerator.js' */            this.nextItem = this.item.nextSibling;
/*Line 36 - 'ChildEnumerator.js' */            this.findNext();
/*Line 37 - 'ChildEnumerator.js' */            return this.item ? true : false;
/*Line 38 - 'ChildEnumerator.js' */        }
859744
public function isSatisfiedBy($item): bool
    {
        $children = $this->locationService->loadLocationChildren($item);

        return 0 < $children->totalCount;
    }
1081506
def parent_id?(item)
      parent.id && item.send(foreign_key).eql?(parent.id)
    end
938996
def render(item, parent = nil)
      item = item.to_hash if item.respond_to?(:to_hash)
      if item.is_a?(Hash)
        item = item.inject({}) { |memo, (k,v)| memo[sym(k)] = v; memo }
        item.inject({}) {|memo, (k,v)| memo[sym(k)] = render(v, item); memo}
      elsif item.is_a?(Array)
        item.map { |i| render(i, parent) }
      elsif item.is_a?(String)
        item % parent rescue item
      else
        item
      end
    end
1158817
def child_added(self, child):
        
        super(AbstractWidgetItemGroup, self).child_added(child)
        self.get_member('_items').reset(self)
913127
public function hasChild($itemName, $childName)
    {
        $children = $this->getChildren($itemName);
        if (in_array($childName, $children)) {
            return true;
        }
        return false;
    }
491189
def fill_parentidid2obj_r1(self, id2obj_user, child_obj):
        """"""
        for higher_obj in self._getobjs_higher(child_obj):
            if higher_obj.item_id not in id2obj_user:
                id2obj_user[higher_obj.item_id] = higher_obj
                self.fill_parentidid2obj_r1(id2obj_user, higher_obj)
646672
function findItem( path, items ) {
  var result = null;
  items.forEach( function ( item ) {
    if (!result && item instanceof MenuItem && item.paths.filter( function( value ) {
        return value === path;
      } ).length > 0)
      result = item;
    if (!result && item instanceof MenuNode) {
      var child = findItem( path, item.children );
      if (child)
        result = child;
    }
  } );
  return result;
}
35715
public function &getItemByID($id)
    {
        if ( ! $count = parent::count()) {
            return false;
        }
        /** @var \Colibri\Database\Model $itemClass */
        $itemClass = static::$itemClass;
        /** @noinspection PhpUndefinedVariableInspection */
        $PKfn = $itemClass::$PKFieldName[0];
        for ($i = 0; $i < $count; $i++) {
            if (isset($this->items[$i]->$PKfn) && $this->items[$i]->$PKfn == $id) {
                return $this->items[$i];
            }
        }

        return false;
    }
735390
def _check_descendant(self, item):
        """"""
        children = self.get_children(item)
        for iid in children:
            self.change_state(iid, "checked")
            self._check_descendant(iid)
1336168
function (event) {
            var item, c;
            for (var i = 0; i < event.$.items.length; i++) {
                item = event.$.items[i];
                c = this.getComponentForItem(item);
                // TODO:
                this.$parent.removeChild(c);
                this._innerAddChild(c);
            }
        }
1085729
def _is_child_wikicode(self, obj, recursive=True):
        """"""
        def deref(nodes):
            if isinstance(nodes, _ListProxy):
                return nodes._parent  # pylint: disable=protected-access
            return nodes

        target = deref(obj.nodes)
        if target is deref(self.nodes):
            return True
        if recursive:
            todo = [self]
            while todo:
                code = todo.pop()
                if target is deref(code.nodes):
                    return True
                for node in code.nodes:
                    todo += list(node.__children__())
        return False
1319208
def findPreviousItem(self, item):
        
        if not item:
            return None
        
        while item.parent():
            index = item.parent().indexOfChild(item)
            if index == 0:
                return item.parent()
            
            child = item.parent().child(index-1)
            if child:
                while child.childCount():
                    child = child.child(child.childCount() - 1)
                return child
            
            item = item.parent()
        
        index = self.indexOfTopLevelItem(item)
        out = self.topLevelItem(index-1)
        while out and out.childCount():
            out = out.child(out.childCount() - 1)
        return out
1217228
protected function isChildActive($items, &$active)
    {
        foreach ($items as $i => $child) {
            if (is_array($child) && !ArrayHelper::getValue($child, 'visible', true)) {
                continue;
            }
            if (ArrayHelper::remove($items[$i], 'active', false) || $this->isItemActive($child)) {
                Html::addCssClass($items[$i]['options'], 'active');
                if ($this->activateParents) {
                    $active = true;
                }
            }
            $childItems = ArrayHelper::getValue($child, 'items');
            if (is_array($childItems)) {
                $activeParent = false;
                $items[$i]['items'] = $this->isChildActive($childItems, $activeParent);
                if ($activeParent) {
                    Html::addCssClass($items[$i]['options'], 'active');
                    $active = true;
                }
            }
        }
        return $items;
    }
398395
private void initializeItems(Object kid) {

        if (kid instanceof UISelectItem) {
            UISelectItem ui = (UISelectItem) kid;
            SelectItem item = (SelectItem) ui.getValue();
            if (item == null) {
                item = new SelectItem(ui.getItemValue(),
                                      ui.getItemLabel(),
                                      ui.getItemDescription(),
                                      ui.isItemDisabled(),
                                      ui.isItemEscaped(),
                                      ui.isNoSelectionOption());
            }
            updateSingeItemIterator(item);
            items = singleItemIterator;
        } else if (kid instanceof UISelectItems) {
            UISelectItems ui = (UISelectItems) kid;
            Object value = ui.getValue();
            if (value != null) {
                if (value instanceof SelectItem) {
                    updateSingeItemIterator((SelectItem) value);
                    items = singleItemIterator;
                } else if (value.getClass().isArray()) {
                    items = new ArrayIterator(ctx, (UISelectItems) kid, value);
                } else if (value instanceof Iterable) {
                    items = new IterableItemIterator(ctx,
                                                     (UISelectItems) kid,
                                                     (Iterable<?>) value);
                } else if (value instanceof Map) {
                    items = new MapIterator((Map) value);
                } else {
                    throw new IllegalArgumentException();
                }
            }
            if (items != null && !items.hasNext()) {
                items = null;
            }
        } 

    }