Add folder to the report if it was sent.
        :param item: LocalFolder folder to possibly add
        :param parent: LocalFolder/LocalContent not used here
482541
def visit_folder(self, item, parent):
        
        if item.sent_to_remote:
            self._add_report_item(item.path, item.remote_id)
487549
public void addMenuItem(SubMenuItem parent, MenuItem item) {
        SubMenuItem subMenu = (parent != null) ? parent : ROOT;

        synchronized (subMenuItems) {
            ArrayList<MenuItem> subMenuChildren = subMenuItems.computeIfAbsent(subMenu, sm -> new ArrayList<>());
            subMenuChildren.add(item);

            if (item.hasChildren()) {
                subMenuItems.put(item, new ArrayList<>());
            }
        }
    }
18442
def addItemTag(self, item, tag):
        
        if self.inItemTagTransaction:
            # XXX: what if item's parent is not a feed?
            if not tag in self.addTagBacklog:
                self.addTagBacklog[tag] = []                
            self.addTagBacklog[tag].append({'i': item.id, 's': item.parent.id})
            return "OK"
        else:
            return self._modifyItemTag(item.id, 'a', tag)
717676
def addTopLevelItem(self, item):
        
        vitem = item.viewItem()
        
        self.treeWidget().addTopLevelItem(item)
        self.viewWidget().scene().addItem(vitem)
        
        item._viewItem = weakref.ref(vitem)
        
        if self.updatesEnabled():
            try:
                item.sync(recursive=True)
            except AttributeError:
                pass
1358437
def addItem( self, item ):
        
        result = super(XNodeScene, self).addItem(item)
        self.setModified()
        self._cache.add(item)
        
        return result
663705
def add_items_to_tree_iter(self, input_dict, treeiter, parent_dict_path=None):
        
        if parent_dict_path is None:
            parent_dict_path = []
        self.get_view_selection()
        for key, value in sorted(input_dict.items()):
            element_dict_path = copy.copy(parent_dict_path) + [key]
            if isinstance(value, dict):
                new_iter = self.tree_store.append(treeiter, [key, "", True, element_dict_path])
                self.add_items_to_tree_iter(value, new_iter, element_dict_path)
            else:
                self.tree_store.append(treeiter, [key, value, False, element_dict_path])
931446
def add_item(self, item):
        
        if item.get_type() == ebooklib.ITEM_STYLE:
            self.add_link(href=item.get_name(), rel='stylesheet', type='text/css')

        if item.get_type() == ebooklib.ITEM_SCRIPT:
            self.add_link(src=item.get_name(), type='text/javascript')
312905
public void appendItem (T item)
    {
        // if we're on the last page and there are fewer than a full page of items, this new item
        // will show up on this page so add it
        if (_pageItems.size() < _pageCount) {
            _pageItems.add(item);
        }
        _count++;
    }
131233
private void addOuToTree(CmsOrganizationalUnit ou, CmsOrganizationalUnit parent_ou) {

        Item containerItem;
        containerItem = m_treeContainer.addItem(ou);
        if (containerItem == null) {
            containerItem = getItem(ou);
        }
        containerItem.getItemProperty(PROP_NAME).setValue(getIconCaptionHTML(ou, CmsOuTreeType.OU));
        containerItem.getItemProperty(PROP_TYPE).setValue(CmsOuTreeType.OU);
        m_treeContainer.setParent(ou, parent_ou);
    }
1044528
function importFolderItem(item, parentId) {
  return {
    parentId,
    _id: `__GRP_${requestGroupCount++}__`,
    _type: 'request_group',
    name: item.name || `Folder {requestGroupCount}`,
    description: item.description || '',
  };
}
1107029
def folderitem(self, obj, item, index):
        

        ar = obj.getAnalysisRequest()
        review_state = api.get_workflow_status_of(ar)
        status_title = review_state.capitalize().replace("_", " ")

        item["replace"]["AnalysisRequest"] = get_link(
            ar.absolute_url(), value=ar.Title()
        )

        pdf = self.get_pdf(obj)
        filesize = self.get_filesize(pdf)
        if filesize > 0:
            url = "{}/download_pdf".format(obj.absolute_url())
            item["replace"]["PDF"] = get_link(
                url, value="PDF", target="_blank")

        item["State"] = _BMF(status_title)
        item["state_class"] = "state-{}".format(review_state)
        item["FileSize"] = "{:.2f} Kb".format(filesize)
        fmt_date = self.localize_date(obj.created())
        item["Date"] = fmt_date
        item["PublishedBy"] = self.user_fullname(obj.Creator())

        contained_ars = obj.getField("ContainedAnalysisRequests").get(obj)
        ar_icon_url = "{}/{}".format(
            self.portal_url,
            "++resource++bika.lims.images/analysisrequest.png"
        )
        ars = []
        item["ContainedAnalysisRequests"] = ""
        for num, ar in enumerate(contained_ars):
            ars.append(
                "<a href='{url}' target='_blank' title='{ar_id}'>"
                "<img src='{ar_icon_url}' title='{ar_id}'/>"
                "</a>".format(
                    url=ar.absolute_url(),
                    ar_id=ar.getId(),
                    ar_icon_url=ar_icon_url)
            )
        item["replace"]["ContainedAnalysisRequests"] = " ".join(ars)

        # Metadata
        metadata = obj.getField("Metadata").get(obj) or {}
        template = metadata.get("template", "")
        paperformat = metadata.get("paperformat", "")
        orientation = metadata.get("orientation", "")
        item["Metadata"] = ""
        if all([template, paperformat, orientation]):
            item["replace"]["Metadata"] = " ".join([
                "<abbr title='{}'>ℹ</abbr>".format(template),
                "<abbr title='{}'>⇲</abbr>".format(paperformat),
                "<abbr title='{}'>↺</abbr>".format(orientation),
            ])

        # N.B. There is a bug in the current publication machinery, so that
        # only the primary contact get stored in the Attachment as recipient.
        #
        # However, we're interested to show here the full list of recipients,
        # so we use the recipients of the containing AR instead.
        recipients = []

        for recipient in self.get_recipients(ar):
            email = safe_unicode(recipient["EmailAddress"])
            fullname = safe_unicode(recipient["Fullname"])
            if email:
                value = u"<a href='mailto:{}'>{}</a>".format(email, fullname)
                recipients.append(value)
            else:
                message = _("No email address set for this contact")
                value = u"<span title='{}' class='text text-danger'>" \
                        u"⚠ {}</span>".format(message, fullname)
                recipients.append(value)

        item["replace"]["Recipients"] = ", ".join(recipients)

        # No recipient with email set preference found in the AR, so we also
        # flush the Recipients data from the Attachment
        if not recipients:
            item["Recipients"] = ""

        return item
338269
def add_item(self, item):
        
        item.parent = self
        #self.phrases[phrase.description] = phrase
        self.items.append(item)
58478
def add_items(self, data_dict, root=None, target=None):
        
        if root is None:
            print("Warning: TreeCtrl root must be given.")
            return
        if target is None:
            print("Warning: TreeCtrl target must be given.")
            return
        for k in sorted(data_dict):
            if isinstance(data_dict[k], dict):
                k_item_root = target.AppendItem(root, k)
                self.add_items(data_dict[k], k_item_root, target)
            else:
                item_val = ' : '.join((k, str(data_dict[k])))
                target.AppendItem(root, item_val)
439354
public final void addFolder(@NotNull final Folder folder) {
        Contract.requireArgNotNull("folder", folder);
        if (folders == null) {
            folders = new ArrayList<>();
        }
        folders.add(folder);
    }
1046931
def visit_folder(self, item, parent):
        
        if not item.remote_id:
            command = CreateFolderCommand(self.settings, item, parent)
            self.task_runner_add(parent, item, command)
629073
def folderitem(self, obj, item, index):
        
        url = item.get("url")
        title = item.get("Title")
        creator = obj.Creator()

        item["replace"]["Title"] = get_link(url, value=title)
        item["created"] = self.localize_date(obj.created())
        item["getType"] = _(obj.getType()[0])
        item["creator"] = ""
        if creator:
            props = api.get_user_properties(creator)
            name = props.get("fullname", creator)
            item["creator"] = name

        return item
825734
protected void addItem(ItemState item)
   {
      index.put(item.getData().getIdentifier(), item);
      index.put(item.getData().getQPath(), item);
      index.put(new ParentIDQPathBasedKey(item), item);
      index.put(new IDStateBasedKey(item.getData().getIdentifier(), item.getState()), item);

      if (item.getData().isNode())
      {
         Map<String, ItemState> children = lastChildNodeStates.get(item.getData().getParentIdentifier());
         if (children == null)
         {
            children = new HashMap<String, ItemState>();
            lastChildNodeStates.put(item.getData().getParentIdentifier(), children);
         }
         children.put(item.getData().getIdentifier(), item);

         List<ItemState> listItemState = childNodeStates.get(item.getData().getParentIdentifier());
         if (listItemState == null)
         {
            listItemState = new ArrayList<ItemState>();
            childNodeStates.put(item.getData().getParentIdentifier(), listItemState);
         }
         listItemState.add(item);
         if (item.isPathChanged())
         {
            if (allPathsChanged == null)
            {
               allPathsChanged = new ArrayList<ItemState>();
            }
            allPathsChanged.add(item);
         }
      }
      else
      {
         Map<String, ItemState> children = lastChildPropertyStates.get(item.getData().getParentIdentifier());
         if (children == null)
         {
            children = new HashMap<String, ItemState>();
            lastChildPropertyStates.put(item.getData().getParentIdentifier(), children);
         }
         children.put(item.getData().getIdentifier(), item);

         List<ItemState> listItemState = childPropertyStates.get(item.getData().getParentIdentifier());
         if (listItemState == null)
         {
            listItemState = new ArrayList<ItemState>();
            childPropertyStates.put(item.getData().getParentIdentifier(), listItemState);
         }
         listItemState.add(item);
      }

      if (item.isNode() && item.isPersisted())
      {
         int[] childInfo = childNodesInfo.get(item.getData().getParentIdentifier());
         if (childInfo == null)
         {
            childInfo = new int[2];
         }

         if (item.isDeleted())
         {
            --childInfo[CHILD_NODES_COUNT];
         }
         else if (item.isAdded())
         {
            ++childInfo[CHILD_NODES_COUNT];
            childInfo[CHILD_NODES_LAST_ORDER_NUMBER] = ((NodeData)item.getData()).getOrderNumber();

         }
         childNodesInfo.put(item.getData().getParentIdentifier(), childInfo);
      }
   }