client/jsonapi/src/Client/JsonApi/Product/Standard.php
protected function getController( \Aimeos\MW\View\Iface $view )
	{
		$context = $this->getContext();
		$cntl = \Aimeos\Controller\Frontend::create( $context, 'product' );

		/** client/jsonapi/product/levels
		 * Include products of sub-categories in the product list of the current category
		 *
		 * Sometimes it may be useful to show products of sub-categories in the
		 * current category product list, e.g. if the current category contains
		 * no products at all or if there are only a few products in all categories.
		 *
		 * Possible constant values for this setting are:
		 * * 1 : Only products from the current category
		 * * 2 : Products from the current category and the direct child categories
		 * * 3 : Products from the current category and the whole category sub-tree
		 *
		 * Caution: Please keep in mind that displaying products of sub-categories
		 * can slow down your shop, especially if it contains more than a few
		 * products! You have no real control over the positions of the products
		 * in the result list too because all products from different categories
		 * with the same position value are placed randomly.
		 *
		 * Usually, a better way is to associate products to all categories they
		 * should be listed in. This can be done manually if there are only a few
		 * ones or during the product import automatically.
		 *
		 * @param integer Tree level constant
		 * @since 2017.03
		 * @category Developer
		 */
		$level = $context->getConfig()->get( 'client/jsonapi/product/levels', \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE );

		foreach( (array) $view->param( 'filter/f_oneid', [] ) as $list ) {
			$cntl->oneOf( $list );
		}

		$cntl->allOf( $view->param( 'filter/f_attrid', [] ) )
			->oneOf( $view->param( 'filter/f_optid', [] ) )
			->text( $view->param( 'filter/f_search' ) )
			->supplier( $view->param( 'filter/f_supid', [] ), $view->param( 'filter/f_listtype', 'default' ) )
			->category( $view->param( 'filter/f_catid' ), $view->param( 'filter/f_listtype', 'default' ), $level );

		$params = (array) $view->param( 'filter', [] );

		unset( $params['f_supid'], $params['f_search'] );
		unset( $params['f_catid'], $params['f_listtype'] );
		unset( $params['f_attrid'], $params['f_optid'], $params['f_oneid'] );

		return $cntl->parse( $params )
			->sort( $view->param( 'sort', 'relevance' ) )
			->slice( $view->param( 'page/offset', 0 ), $view->param( 'page/limit', 48 ) );
	}
protected function getController( \Aimeos\MW\View\Iface $view )
	{
		$context = $this->getContext();
		$cntl = \Aimeos\Controller\Frontend::create( $context, 'product' );

		/** client/jsonapi/product/levels
		 * Include products of sub-categories in the product list of the current category
		 *
		 * Sometimes it may be useful to show products of sub-categories in the
		 * current category product list, e.g. if the current category contains
		 * no products at all or if there are only a few products in all categories.
		 *
		 * Possible constant values for this setting are:
		 * * 1 : Only products from the current category
		 * * 2 : Products from the current category and the direct child categories
		 * * 3 : Products from the current category and the whole category sub-tree
		 *
		 * Caution: Please keep in mind that displaying products of sub-categories
		 * can slow down your shop, especially if it contains more than a few
		 * products! You have no real control over the positions of the products
		 * in the result list too because all products from different categories
		 * with the same position value are placed randomly.
		 *
		 * Usually, a better way is to associate products to all categories they
		 * should be listed in. This can be done manually if there are only a few
		 * ones or during the product import automatically.
		 *
		 * @param integer Tree level constant
		 * @since 2017.03
		 * @category Developer
		 */
		$level = $context->getConfig()->get( 'client/jsonapi/product/levels', \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE );

		foreach( (array) $view->param( 'filter/f_oneid', [] ) as $list ) {
			$cntl->oneOf( $list );
		}

		$cntl->allOf( $view->param( 'filter/f_attrid', [] ) )
			->oneOf( $view->param( 'filter/f_optid', [] ) )
			->text( $view->param( 'filter/f_search' ) )
			->supplier( $view->param( 'filter/f_supid', [] ), $view->param( 'filter/f_listtype', 'default' ) )
			->category( $view->param( 'filter/f_catid' ), $view->param( 'filter/f_listtype', 'default' ), $level );

		$params = (array) $view->param( 'filter', [] );

		unset( $params['f_supid'], $params['f_search'] );
		unset( $params['f_catid'], $params['f_listtype'] );
		unset( $params['f_attrid'], $params['f_optid'], $params['f_oneid'] );

		return $cntl->parse( $params )
			->sort( $view->param( 'sort', 'relevance' ) )
			->slice( $view->param( 'page/offset', 0 ), $view->param( 'page/limit', 48 ) );
	}
protected function getController ( \ Aimeos \ MW \ View \ Iface $ view ) { $ context = $ this -> getContext ( ) ; $ cntl = \ Aimeos \ Controller \ Frontend :: create ( $ context , 'product' ) ; /** client/jsonapi/product/levels
		 * Include products of sub-categories in the product list of the current category
		 *
		 * Sometimes it may be useful to show products of sub-categories in the
		 * current category product list, e.g. if the current category contains
		 * no products at all or if there are only a few products in all categories.
		 *
		 * Possible constant values for this setting are:
		 * * 1 : Only products from the current category
		 * * 2 : Products from the current category and the direct child categories
		 * * 3 : Products from the current category and the whole category sub-tree
		 *
		 * Caution: Please keep in mind that displaying products of sub-categories
		 * can slow down your shop, especially if it contains more than a few
		 * products! You have no real control over the positions of the products
		 * in the result list too because all products from different categories
		 * with the same position value are placed randomly.
		 *
		 * Usually, a better way is to associate products to all categories they
		 * should be listed in. This can be done manually if there are only a few
		 * ones or during the product import automatically.
		 *
		 * @param integer Tree level constant
		 * @since 2017.03
		 * @category Developer
		 */ $ level = $ context -> getConfig ( ) -> get ( 'client/jsonapi/product/levels' , \ Aimeos \ MW \ Tree \ Manager \ Base :: LEVEL_ONE ) ; foreach ( ( array ) $ view -> param ( 'filter/f_oneid' , [ ] ) as $ list ) { $ cntl -> oneOf ( $ list ) ; } $ cntl -> allOf ( $ view -> param ( 'filter/f_attrid' , [ ] ) ) -> oneOf ( $ view -> param ( 'filter/f_optid' , [ ] ) ) -> text ( $ view -> param ( 'filter/f_search' ) ) -> supplier ( $ view -> param ( 'filter/f_supid' , [ ] ) , $ view -> param ( 'filter/f_listtype' , 'default' ) ) -> category ( $ view -> param ( 'filter/f_catid' ) , $ view -> param ( 'filter/f_listtype' , 'default' ) , $ level ) ; $ params = ( array ) $ view -> param ( 'filter' , [ ] ) ; unset ( $ params [ 'f_supid' ] , $ params [ 'f_search' ] ) ; unset ( $ params [ 'f_catid' ] , $ params [ 'f_listtype' ] ) ; unset ( $ params [ 'f_attrid' ] , $ params [ 'f_optid' ] , $ params [ 'f_oneid' ] ) ; return $ cntl -> parse ( $ params ) -> sort ( $ view -> param ( 'sort' , 'relevance' ) ) -> slice ( $ view -> param ( 'page/offset' , 0 ) , $ view -> param ( 'page/limit' , 48 ) ) ; }
Returns the initialized product controller

@param \Aimeos\MW\View\Iface $view View instance
@return \Aimeos\Controller\Frontend\Product\Iface Initialized product controller
Returns the initialized product controller