Adds a child item for each item
490402
def _fetchAllChildren(self):
        
        childItems = []
        logger.debug("{!r} _fetchAllChildren {!r}".format(self, self.fileName))

        if self.hasChildren():
            for key, value in sorted(self._dictionary.items()):
                # TODO: pass the attributes to the children? (probably not)
                childItem = _createFromObject(value, str(key), self.fileName)
                childItem._iconColor = self.iconColor
                childItems.append(childItem)

        return childItems
785862
def expand_all(self):
        """"""

        def aux(item):
            self.item(item, open=True)
            children = self.get_children(item)
            for c in children:
                aux(c)

        children = self.get_children("")
        for c in children:
            aux(c)
486296
def _get_id2children(id2children, item_id, item_obj):
    """"""
    if item_id in id2children:
        return id2children[item_id]
    child_ids = set()
    for child_obj in item_obj.children:
        child_id = child_obj.item_id
        child_ids.add(child_id)
        child_ids |= _get_id2children(id2children, child_id, child_obj)
    id2children[item_id] = child_ids
    return child_ids
10762
def render_children
      children = ''

      list_item.children.each do |child|
        children += self.class.render(child, opts)
      end

      children
    end
296615
private void addChildren(
        CmsTreeItem parent,
        List<CmsCategoryTreeEntry> children,
        Collection<String> selectedCategories) {

        if (children != null) {
            for (CmsCategoryTreeEntry child : children) {
                // set the category tree item and add to parent tree item
                CmsTreeItem treeItem;
                boolean isPartofPath = false;
                Iterator<String> it = selectedCategories.iterator();
                while (it.hasNext()) {
                    String path = it.next();
                    if (path.contains(child.getPath())) {
                        isPartofPath = true;
                    }
                }
                if (isPartofPath) {
                    m_singleSidePath = child.getSitePath();
                    m_valuesSet++;
                    if (m_selectParent || !hasSelectedChildren(child.getChildren(), selectedCategories)) {
                        m_allSidePath.add(child.getSitePath());
                        treeItem = buildTreeItem(child, selectedCategories, false);
                    } else {
                        treeItem = buildTreeItem(child, selectedCategories, true);
                    }
                    addChildren(treeItem, child.getChildren(), selectedCategories);
                    parent.addChild(treeItem);
                }

            }
        }
    }
78375
function(child) {
            if (arguments.length > 1) {
                for (var i = 0; i < arguments.length; i++) {
                    this.add(arguments[i]);
                }
                return;
            }
            if (child.getParent()) {
                child.moveTo(this);
                return;
            }
            var children = this.children;
            this._validateAdd(child);
            child.index = children.length;
            child.parent = this;
            children.push(child);
            this._fire('add', {
                child: child
            });

            // chainable
            return this;
        }
319221
def add_child(self, obj):
        """"""
        self.children.append(obj)
        obj.parents.append(self)
124948
def register_items(self, items):
        
        for item in items:
            item.set_parent(self)
        self.items.extend(items)
487338
def addchild(self, child):
        
        if not self.accept_children:
            return False
        self.children += [child]
        return True
164613
function add(scope, element) {
        updateDelayed();

        items.push({
            element: element,
            scope:   scope
        });
    }
175013
private void addLeftItems() {
        // Log.w(TAG,"addLeftItems() {.... (0)");

        if (leftItems.size() == 0) {
            return;
        }
        // Log.w(TAG,"addLeftItems() {.... (1)");
        ArrayList<T> currentLeftItems = new ArrayList<T>();
        currentLeftItems.addAll(leftItems);
        // Log.w(TAG,"addLeftItems() {.... (2)");

        synchronized (leftItems) {
            // Log.w(TAG,"addLeftItems() {.... (3.1)");
            leftItems.clear();
            // Log.w(TAG,"addLeftItems() {.... (3.1)");
        }
        // Log.w(TAG,"addLeftItems() {.... (4)");
        for (T currentLeftItem : currentLeftItems) {
            // Log.w(TAG,"addLeftItems() {.... (5.1)");
            addItem(currentLeftItem);
            // Log.w(TAG,"addLeftItems() {.... (5.2)");
        }
    }
864655
def addMenuItem( self, newItem, atItem ):
        
        tree = self.uiMenuTREE
        
        if ( not atItem ):
            tree.addTopLevelItem(newItem)
            
        elif ( atItem.data(0, Qt.UserRole) == 'menu' ):
            atItem.addChild(newItem)
        
        elif ( atItem.parent() ):
            index = atItem.parent().indexOfChild(atItem)
            atItem.parent().insertChild(index + 1, newItem)
        
        else:
            index = tree.indexOfTopLevelItem(atItem)
            tree.insertTopLevelItem(index + 1, newItem)
1269178
def add(bullet, *items)
      items.each do |item|
        @bullet_data << [bullet.to_s, item]
        bullet = ""
      end
    end
1109613
protected void addChildren(CmsTreeItem parent, List<CmsGalleryTreeEntry> children, List<String> selectedGalleries) {

        if (children != null) {
            for (CmsGalleryTreeEntry child : children) {
                // set the category tree item and add to parent tree item
                CmsTreeItem treeItem = createTreeItem(child, selectedGalleries, true);
                if ((selectedGalleries != null) && selectedGalleries.contains(child.getPath())) {
                    parent.setOpen(true);
                    openParents(parent);
                }
                parent.addChild(treeItem);
                addChildren(treeItem, child.getChildren(), selectedGalleries);
            }
        }
    }
1216720
function addBindings() {
      for (var i = 0; i < this._c.length; i++) {
        this.bind(this._c[i].children);
      }
    }
1335225
function addChild(child, node) {
    var children = node.children;
    if (child.parentNode === node) {
        return;
    }

    children.push(child);
    child.parentNode = node;
}
402602
function addFlattened(array, item) {
  if (item === null || typeof item !== 'object') {
    const child =
      item === undefined || item === null || item === true || item === false
        ? ''
        : '' + item

    const arrayLength = array.length

    if (arrayLength > 0 && typeof array[arrayLength - 1] === 'string') {
      array[arrayLength - 1] += child
    } else {
      array.push(child)
    }
  } else if (Array.isArray(item)) {
    for (let i = 0; i < item.length; ++i) {
      addFlattened(array, item[i])
    }
  } else if (item[Symbol.iterator]) {
    for (const x of item) {
      addFlattened(array, x)
    }
  } else {
    array.push(item)
  }
}