Adds a new item object.

@param MShop_Common_Item_Interface $item Item which should be inserted
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 );
	}
517776
public function insertItem($item,$position=0){
		$itemO=$this->beforeAddItem($item);
		 $start = array_slice($this->items, 0, $position);
		 $end = array_slice($this->items, $position);
		 $start[] = $item;
		 $this->items=array_merge($start, $end);
		 return $itemO;
	}
1183231
public function add($item)
    {
        foreach ($this->_requiredInterfaces as $interface) {
            if (!$item instanceof $interface) {
                throw new RuntimeException(
                    sprintf('Item "%s" should implement "%s" interface', get_class($item), $interface)
                );
            }
        }
        
        $this->_items[spl_object_hash($item)] = $item;
        return $this;
    }
290061
public function addItem($item){
		$itemO=$this->getItemToAdd($item);
		$this->addContent($itemO);
		return $itemO;
	}
1196562
private function addItem(Item $item)
    {
        $em = $this->getDoctrine()->getManager();
        $em->persist($item);
        $em->flush();

        return $this->redirect($this->generateUrl(
            'item_show',
            ['id' => $item->getId(), 'name' => $item->getUrlName()]
        ));
    }
780960
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->addGenre($this);
        }

        return $this;
    }
791952
public function addArticleItem(WxSendNewsMsgItem $item)
    {
        if (sizeof($this->articles) >= self::MAX_ITEMS_COUNT) {
            array_shift($this->articles);
        }

        $this->articles[] = $item;
    }
1113113
public function add(Item $item)
    {
        foreach ($this->filters as $filter) {
            $this->applyFilter($filter, $item);
        }

        $this->items[] = $item;

        return $this;
    }
1255226
public function add ($item) {
        if (!$this->getConnection ()->getClient ()->sadd ($this->name , $item)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        return true;
    }
1276120
public function setItem(Item $item)
    {
        $this->childOf = $item->id;
        $this->_item = $item;
        
        return $this;
    }
203667
public TableWriteItems addItemToPut(Item item) {
        if (item != null) {
            if (itemsToPut == null)
                itemsToPut = new ArrayList<Item>();
            this.itemsToPut.add(item);
        }
        return this;
    }
163197
public void addItem(T item) {
        mListItems.add(item);
        notifyItemInserted(mListItems.indexOf(item));
    }
1029988
public function addItem(Item $item)
    {
        if ($this->has($item->name)) {
            throw new DuplicateItemNameException(
                sprintf('An item with name `%s` already exists in the menu `%s`',
                    $item->name, $item->menu->name
                )
            );
        }

        return $this->put($item->name, $item);
    }
470756
public function copyFrom( MShop_Order_Item_Base_Address_Interface $item )
	{
		$this->setCompany( $item->getCompany() );
		$this->setVatID( $item->getVatID() );
		$this->setSalutation( $item->getSalutation() );
		$this->setTitle( $item->getTitle() );
		$this->setFirstname( $item->getFirstname() );
		$this->setLastname( $item->getLastname() );
		$this->setAddress1( $item->getAddress1() );
		$this->setAddress2( $item->getAddress2() );
		$this->setAddress3( $item->getAddress3() );
		$this->setPostal( $item->getPostal() );
		$this->setCity( $item->getCity() );
		$this->setState( $item->getState() );
		$this->setCountryId( $item->getCountryId() );
		$this->setLanguageId( $item->getLanguageId() );
		$this->setTelephone( $item->getTelephone() );
		$this->setTelefax( $item->getTelefax() );
		$this->setEmail( $item->getEmail() );
		$this->setWebsite( $item->getWebsite() );
		$this->setFlag( $item->getFlag() );
	}
709685
public function addItem(Item $item) {
        if(empty($item->title) && empty($item->description)) {
            throw new Exception('At least one of title or description must be defined.');
        }

        $this->items[] = $item;
    }
825373
public function addItem(ItemInterface $item)
    {
        if ($this->hasItem($item->getId()) === true) {
            throw new \RuntimeException(sprintf('A previous item exists with the same id: "%s".', $item->getId()));
        }

        $this->items[$item->getId()] = $item;
    }
1203840
public function addItem(ItemInterface $item)
    {
        $this->itemsChanged = true;
        $this->entity->addItem($item);

        return $this;
    }