admin/jsonadm/src/Admin/JsonAdm/Standard.php
protected function deleteItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), $this->getPath() );

		if( ( $id = $view->param( 'id' ) ) == null )
		{
			$body = (string) $request->getBody();

			if( ( $payload = json_decode( $body ) ) === null || !isset( $payload->data ) || !is_array( $payload->data ) ) {
				throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON in body' ), 400 );
			}

			$ids = $this->getIds( $payload );
			$manager->deleteItems( $ids );
			$view->total = count( $ids );
		}
		else
		{
			$manager->deleteItem( $id );
			$view->total = 1;
		}

		return $response;
	}
protected function deleteItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), $this->getPath() );

		if( ( $id = $view->param( 'id' ) ) == null )
		{
			$body = (string) $request->getBody();

			if( ( $payload = json_decode( $body ) ) === null || !isset( $payload->data ) || !is_array( $payload->data ) ) {
				throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON in body' ), 400 );
			}

			$ids = $this->getIds( $payload );
			$manager->deleteItems( $ids );
			$view->total = count( $ids );
		}
		else
		{
			$manager->deleteItem( $id );
			$view->total = 1;
		}

		return $response;
	}
protected function deleteItems ( \ Aimeos \ MW \ View \ Iface $ view , ServerRequestInterface $ request , ResponseInterface $ response ) { $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , $ this -> getPath ( ) ) ; if ( ( $ id = $ view -> param ( 'id' ) ) == null ) { $ body = ( string ) $ request -> getBody ( ) ; if ( ( $ payload = json_decode ( $ body ) ) === null || ! isset ( $ payload -> data ) || ! is_array ( $ payload -> data ) ) { throw new \ Aimeos \ Admin \ JsonAdm \ Exception ( sprintf ( 'Invalid JSON in body' ) , 400 ) ; } $ ids = $ this -> getIds ( $ payload ) ; $ manager -> deleteItems ( $ ids ) ; $ view -> total = count ( $ ids ) ; } else { $ manager -> deleteItem ( $ id ) ; $ view -> total = 1 ; } return $ response ; }
Deletes one or more items

@param \Aimeos\MW\View\Iface $view View instance with "param" view helper
@param \Psr\Http\Message\ServerRequestInterface $request Request object
@param \Psr\Http\Message\ResponseInterface $response Response object
@return \Psr\Http\Message\ResponseInterface Modified response object
@throws \Aimeos\Admin\JsonAdm\Exception If the request body is invalid
Deletes one or more items