Creates a list of items with children.

@param MShop_Locale_Item_Site_Interface $item Locale site item
429803
protected function _createNodeArray( MShop_Locale_Item_Site_Interface $item )
	{
		$result = $item->toArray();

		if( method_exists( $item, 'getChildren' ) )
		{
			foreach( $item->getChildren() as $child ) {
				$result['children'][] = $this->_createNodeArray( $child );
			}
		}

		return (object) $result;
	}
650598
protected function renderItem($item)
	{
		if (isset($item['url'])) {
			if($this->useSprites) {
				$spriteUrl = $this->spriteUrl;
				$item['template'] = "<a href=\"{url}\" style=\"background: no-repeat 0 {$this->itemOffset}px url($spriteUrl);\">{label}</a>";
				$this->itemOffset -= 16;
			} else {
				$components = parse_url($item['url']);
				$iconUrl = $this->iconizerBaseUrl . $components['host'];
				$item['template'] = "<a href=\"{url}\" style=\"background: no-repeat url($iconUrl)\">{label}</a>";
			}
		}
		return parent::renderItem($item);
	}
1267780
protected function _createNodeArray( MShop_Catalog_Item_Interface $node )
	{
		$result = $node->toArray();

		foreach( $node->getChildren() as $child ) {
			$result['children'][] = $this->_createNodeArray( $child );
		}

		return (object) $result;
	}
437739
public function add_item(cc_i_item &$item) {
        if (is_null($this->itemlist)) {
            $this->itemlist = array();
        }
        $this->itemlist[$item->identifier] = $item;
    }
585688
public function addItem($item)
	{
		if( ! $item instanceof Model )
		{
			$item = new $this->defaultModel($item);
		}

		$this->data[] = $item;
	}
856319
public function handleItem($item, $lang)
    {
        if (is_array($item)) {
            $item = new SitemapArrayItem($item);
            $loc = $item->getSitemapLoc();
            if (empty($loc)) {
                $this->printMessage('Warning: item "' . var_export($item->item, true) .
                    '" does not have a "loc" value');

                return false;
            }
        } elseif (!$item instanceof Basic) {
            $this->printMessage('Warning: item "' . var_export($item, true) .
                '" does not compatible with "demi\sitemap\interfaces\Basic" or Array');

            return false;
        }

        $builder = $this->builder;
        $url = $builder->newUrl();

        // Basic attributes
        $url->loc($item->getSitemapLoc($lang))
            ->lastmod($item->getSitemapLastmod($lang))
            ->changefreq($item->getSitemapChangefreq($lang))
            ->priority($item->getSitemapPriority($lang));

        // Google image attribute
        if ($item instanceof GoogleImage) {
            $images = $item->getSitemapMaterialImages($item, $lang);

            foreach ($images as $image) {
                $url->addImage(
                    $item->getSitemapImageLoc($image, $lang),
                    $item->getSitemapImageGeoLocation($image, $lang),
                    $item->getSitemapImageCaption($image, $lang),
                    $item->getSitemapImageTitle($image, $lang),
                    $item->getSitemapImageLicense($image, $lang)
                );
            }
        }

        // Google alternate links
        if ($item instanceof GoogleAlternateLang || $item instanceof SitemapArrayItem) {
            $links = $item->getSitemapAlternateLinks();

            foreach ($links as $hreflang => $href) {
                $url->addAlternateLink($hreflang, $href);
            }
        }

        return $builder->writeUrl($url);
    }
358652
private function enrichHeadersWithItem(
        array &$headers,
        Item $item
    ) {
        $this->enrichHeaderWithFields($headers, 'metadata', $item->getMetadata());
        $this->enrichHeaderWithFields($headers, 'indexed_metadata', $item->getIndexedMetadata());
        $this->enrichHeaderWithFields($headers, 'searchable_metadata', $item->getSearchableMetadata());
    }
988088
public function add_item( $item ) {
		if ( is_array( $item ) ) {
			foreach ( $item as $single_item ) {
				$this->add_item( $single_item );
			}
		} else {
			$priority                   = $item->get_priority();
			$this->items[ $priority ][] = $item;
		}
	}
188701
public function addItem(Item $item)
    {
        $itemUUID = $item->composeUUID();

        $this->elementsToUpdate[$itemUUID] = $item;
        unset($this->elementsToDelete[$itemUUID]);
    }
506976
public function insertItem( MShop_Catalog_Item_Interface $item, $parentId = null, $refId = null )
	{
		if ( $parentId !== null ) {

			$parent = $this->_getManager()->getItem( $parentId );
			$siteId = $this->_getContext()->getLocale()->getSiteId();

			if ( $parent->getSiteId() != $siteId ) {
				throw new MShop_Exception( sprintf( 'Site can not be inserted. Site ID of site differs from site ID of parent site.' ) );
			}
		}

		parent::insertItem( $item, $parentId, $refId );
	}
444149
protected function createMediaForItems($items, $locale)
    {
        foreach ($items as $item) {
            $product = $item->getProduct();
            if ($product) {
                $this->productManager->createProductMedia($product, $locale);
            }
            // Set api product for returning media-urls
            $item->setProduct($product);
        }
    }
549061
public void addChild(Item child) {
        if (children == null) {
            children = new ArrayList<>();
        }

        children.add(child);
    }
1276120
public function setItem(Item $item)
    {
        $this->childOf = $item->id;
        $this->_item = $item;
        
        return $this;
    }
406895
public function addGhostItem(Request $request, $item)
    {
        $item->addChild(
            $this->factory->createItem(
                $item['id'],
                array(
                    'uri' => $request->getRequestUri(),
                    'display' => false,
                    'label' => $item['title']
                )
            )
        );
    }
664332
public function getChildMenuItems(MenuItem $item)
    {
        $results = '';
        foreach ($item->getChilds() as $child) {
            if ($child->hidden()) {
                continue;
            }

            if ($child->hasSubMenu()) {
                $results .= $this->getMultiLevelDropdownWrapper($child);
            } elseif ($child->isHeader()) {
                $results .= $this->getHeaderWrapper($child);
            } elseif ($child->isDivider()) {
                $results .= $this->getDividerWrapper();
            } else {
                $results .= $this->getMenuWithoutDropdownWrapper($child);
            }
        }

        return $results;
    }
296020
public function writeItem($item)
    {
        if ($this->autoDetectHeader && !$this->header) {
            $this->handleAutoDetectHeader($item);
        }

        $this->table->addRow(
            $this->getValues($item, $this->getKeys($item))
        );
    }
590874
public function addItem($item, $_deps = null)
    {
        list($item, $_deps) = $this->prepNewItem($item, $_deps);
        $this->setItem($item, $_deps);
    }