protected function _addItem( MW_Container_Content_Interface $contentItem, MShop_Attribute_Item_Interface $item, $langid )
	{
		$listTypes = array();

		foreach( $item->getListItems( 'text' ) as $listItem ) {
			$listTypes[ $listItem->getRefId() ] = $listItem->getType();
		}

		foreach( $this->_getTextTypes( 'attribute' ) as $textTypeItem )
		{
			$textItems = $item->getRefItems( 'text', $textTypeItem->getCode() );

			if( !empty( $textItems ) )
			{
				foreach( $textItems as $textItem )
				{
					$listType = ( isset( $listTypes[ $textItem->getId() ] ) ? $listTypes[ $textItem->getId() ] : '' );
					$items = array( $langid, $item->getType(), $item->getCode(), $listType, $textTypeItem->getCode(), '', '' );

					// use language of the text item because it may be null
					if( ( $textItem->getLanguageId() == $langid || is_null( $textItem->getLanguageId() ) )
						&& $textItem->getTypeId() == $textTypeItem->getId() )
					{
						$items[0] = $textItem->getLanguageId();
						$items[5] = $textItem->getId();
						$items[6] = $textItem->getContent();
					}

					$contentItem->add( $items );
				}
			}
			else
			{
				$items = array( $langid, $item->getType(), $item->getCode(), 'default', $textTypeItem->getCode(), '', '' );
				$contentItem->add( $items );
			}
		}
	}
protected function _addItem( MW_Container_Content_Interface $contentItem, MShop_Attribute_Item_Interface $item, $langid )
	{
		$listTypes = array();

		foreach( $item->getListItems( 'text' ) as $listItem ) {
			$listTypes[ $listItem->getRefId() ] = $listItem->getType();
		}

		foreach( $this->_getTextTypes( 'attribute' ) as $textTypeItem )
		{
			$textItems = $item->getRefItems( 'text', $textTypeItem->getCode() );

			if( !empty( $textItems ) )
			{
				foreach( $textItems as $textItem )
				{
					$listType = ( isset( $listTypes[ $textItem->getId() ] ) ? $listTypes[ $textItem->getId() ] : '' );
					$items = array( $langid, $item->getType(), $item->getCode(), $listType, $textTypeItem->getCode(), '', '' );

					// use language of the text item because it may be null
					if( ( $textItem->getLanguageId() == $langid || is_null( $textItem->getLanguageId() ) )
						&& $textItem->getTypeId() == $textTypeItem->getId() )
					{
						$items[0] = $textItem->getLanguageId();
						$items[5] = $textItem->getId();
						$items[6] = $textItem->getContent();
					}

					$contentItem->add( $items );
				}
			}
			else
			{
				$items = array( $langid, $item->getType(), $item->getCode(), 'default', $textTypeItem->getCode(), '', '' );
				$contentItem->add( $items );
			}
		}
	}
protected function _addItem ( MW_Container_Content_Interface $ contentItem , MShop_Attribute_Item_Interface $ item , $ langid ) { $ listTypes = array ( ) ; foreach ( $ item -> getListItems ( 'text' ) as $ listItem ) { $ listTypes [ $ listItem -> getRefId ( ) ] = $ listItem -> getType ( ) ; } foreach ( $ this -> _getTextTypes ( 'attribute' ) as $ textTypeItem ) { $ textItems = $ item -> getRefItems ( 'text' , $ textTypeItem -> getCode ( ) ) ; if ( ! empty ( $ textItems ) ) { foreach ( $ textItems as $ textItem ) { $ listType = ( isset ( $ listTypes [ $ textItem -> getId ( ) ] ) ? $ listTypes [ $ textItem -> getId ( ) ] : '' ) ; $ items = array ( $ langid , $ item -> getType ( ) , $ item -> getCode ( ) , $ listType , $ textTypeItem -> getCode ( ) , '' , '' ) ; // use language of the text item because it may be null if ( ( $ textItem -> getLanguageId ( ) == $ langid || is_null ( $ textItem -> getLanguageId ( ) ) ) && $ textItem -> getTypeId ( ) == $ textTypeItem -> getId ( ) ) { $ items [ 0 ] = $ textItem -> getLanguageId ( ) ; $ items [ 5 ] = $ textItem -> getId ( ) ; $ items [ 6 ] = $ textItem -> getContent ( ) ; } $ contentItem -> add ( $ items ) ; } } else { $ items = array ( $ langid , $ item -> getType ( ) , $ item -> getCode ( ) , 'default' , $ textTypeItem -> getCode ( ) , '' , '' ) ; $ contentItem -> add ( $ items ) ; } } }
Adds all texts belonging to an attribute item.

@param MW_Container_Content_Interface $contentItem Content item
@param MShop_Attribute_Item_Interface $item product item object
@param string $langid Language id
Adds all texts belonging to an attribute item .