public function getListItems( $domain = null, $type = null )
	{
		if( $domain === null )
		{
			$listItems = array();

			foreach( $this->_listItems as $domain => $items ) {
				$listItems += $items;
			}

			return $listItems;
		}

		if( !isset( $this->_listItems[$domain] ) ) {
			return array();
		}

		if( !isset( $this->_sortedLists[$domain] ) )
		{
			foreach( $this->_listItems[$domain] as $listItem )
			{
				$refId = $listItem->getRefId();

				if( isset( $this->_refItems[$domain][$refId] ) ) {
					$listItem->setRefItem( $this->_refItems[$domain][$refId] );
				}
			}

			uasort( $this->_listItems[$domain], array( $this, '_comparePosition' ) );
			$this->_sortedLists[$domain] = true;
		}

		if( $type !== null )
		{
			$list = array();
			$iface = 'MShop_Common_Item_Typeid_Interface';

			foreach( $this->_listItems[$domain] as $id => $item )
			{
				if( $item instanceof $iface && $type === $item->getType() ) {
					$list[$id] = $item;
				}
			}
		}
		else
		{
			$list = $this->_listItems[$domain];
		}

		return $list;
	}
public function getListItems( $domain = null, $type = null )
	{
		if( $domain === null )
		{
			$listItems = array();

			foreach( $this->_listItems as $domain => $items ) {
				$listItems += $items;
			}

			return $listItems;
		}

		if( !isset( $this->_listItems[$domain] ) ) {
			return array();
		}

		if( !isset( $this->_sortedLists[$domain] ) )
		{
			foreach( $this->_listItems[$domain] as $listItem )
			{
				$refId = $listItem->getRefId();

				if( isset( $this->_refItems[$domain][$refId] ) ) {
					$listItem->setRefItem( $this->_refItems[$domain][$refId] );
				}
			}

			uasort( $this->_listItems[$domain], array( $this, '_comparePosition' ) );
			$this->_sortedLists[$domain] = true;
		}

		if( $type !== null )
		{
			$list = array();
			$iface = 'MShop_Common_Item_Typeid_Interface';

			foreach( $this->_listItems[$domain] as $id => $item )
			{
				if( $item instanceof $iface && $type === $item->getType() ) {
					$list[$id] = $item;
				}
			}
		}
		else
		{
			$list = $this->_listItems[$domain];
		}

		return $list;
	}
public function getListItems ( $ domain = null , $ type = null ) { if ( $ domain === null ) { $ listItems = array ( ) ; foreach ( $ this -> _listItems as $ domain => $ items ) { $ listItems += $ items ; } return $ listItems ; } if ( ! isset ( $ this -> _listItems [ $ domain ] ) ) { return array ( ) ; } if ( ! isset ( $ this -> _sortedLists [ $ domain ] ) ) { foreach ( $ this -> _listItems [ $ domain ] as $ listItem ) { $ refId = $ listItem -> getRefId ( ) ; if ( isset ( $ this -> _refItems [ $ domain ] [ $ refId ] ) ) { $ listItem -> setRefItem ( $ this -> _refItems [ $ domain ] [ $ refId ] ) ; } } uasort ( $ this -> _listItems [ $ domain ] , array ( $ this , '_comparePosition' ) ) ; $ this -> _sortedLists [ $ domain ] = true ; } if ( $ type !== null ) { $ list = array ( ) ; $ iface = 'MShop_Common_Item_Typeid_Interface' ; foreach ( $ this -> _listItems [ $ domain ] as $ id => $ item ) { if ( $ item instanceof $ iface && $ type === $ item -> getType ( ) ) { $ list [ $ id ] = $ item ; } } } else { $ list = $ this -> _listItems [ $ domain ] ; } return $ list ; }
Returns the list items attached, optionally filtered by domain and list type.

The reference parameter in searchItems() must have been set accordingly
to the requested domain to get the items. Otherwise, no items will be
returned by this method.

@param string|null $domain Name of the domain (e.g. product, text, etc.) or null for all
@param string|null $type Name of the list type or null for all
@return array List of items implementing MShop_Common_Item_List_Interface
Returns the list items attached optionally filtered by domain and list type .