public function moveAll()
    {
        try {
            if (!$this->hasRequestParameter('ids')) {
                throw new InvalidArgumentException('Resource ids must be specified.');
            }
            $ids = [];

            foreach ($this->getRequestParameter('ids') as $id) {
                $ids[] = $id['id'];
            }

            $this->validateInstancesRoot($ids);

            if (empty($ids)) {
                throw new InvalidArgumentException('No instances specified.');
            }

            $this->signatureValidator->checkSignatures(
                $this->getRequestParameter('ids')
            );

            $this->validateMoveRequest();

            $response = $this->moveAllInstances($ids);
            $this->returnJson($response);
        } catch (\InvalidArgumentException $e) {
            $this->returnJsonError($e->getMessage());
        }
    }
public function moveAll()
    {
        try {
            if (!$this->hasRequestParameter('ids')) {
                throw new InvalidArgumentException('Resource ids must be specified.');
            }
            $ids = [];

            foreach ($this->getRequestParameter('ids') as $id) {
                $ids[] = $id['id'];
            }

            $this->validateInstancesRoot($ids);

            if (empty($ids)) {
                throw new InvalidArgumentException('No instances specified.');
            }

            $this->signatureValidator->checkSignatures(
                $this->getRequestParameter('ids')
            );

            $this->validateMoveRequest();

            $response = $this->moveAllInstances($ids);
            $this->returnJson($response);
        } catch (\InvalidArgumentException $e) {
            $this->returnJsonError($e->getMessage());
        }
    }
public function moveAll ( ) { try { if ( ! $ this -> hasRequestParameter ( 'ids' ) ) { throw new InvalidArgumentException ( 'Resource ids must be specified.' ) ; } $ ids = [ ] ; foreach ( $ this -> getRequestParameter ( 'ids' ) as $ id ) { $ ids [ ] = $ id [ 'id' ] ; } $ this -> validateInstancesRoot ( $ ids ) ; if ( empty ( $ ids ) ) { throw new InvalidArgumentException ( 'No instances specified.' ) ; } $ this -> signatureValidator -> checkSignatures ( $ this -> getRequestParameter ( 'ids' ) ) ; $ this -> validateMoveRequest ( ) ; $ response = $ this -> moveAllInstances ( $ ids ) ; $ this -> returnJson ( $ response ) ; } catch ( \ InvalidArgumentException $ e ) { $ this -> returnJsonError ( $ e -> getMessage ( ) ) ; } }
Move all specififed resources to the given destination root class

@throws common_exception_Error
@throws common_exception_MethodNotAllowed
@requiresRight id WRITE
Move all specififed resources to the given destination root class