private function move(\core_kernel_classes_Class $destinationClass, array $movableInstances = [], array $statuses = [])
    {
        /** @var core_kernel_classes_Resource $movableInstance */
        foreach ($movableInstances as $movableInstance) {
            $statuses[$movableInstance->getUri()] = [
                'success' => $success = $this->getClassService()->changeClass($movableInstance, $destinationClass),
            ];
            if ($success === true) {
                $statuses[$movableInstance->getUri()]['message'] = sprintf(
                    'Instance "%s" has been successfully moved to "%s"', $movableInstance->getUri(), $destinationClass->getUri()
                );
            } else {
                $statuses[$movableInstance->getUri()]['message'] = sprintf('An error has occurred while persisting instance "%s"', $movableInstance->getUri());
            }
        }

        return $statuses;
    }
private function move(\core_kernel_classes_Class $destinationClass, array $movableInstances = [], array $statuses = [])
    {
        /** @var core_kernel_classes_Resource $movableInstance */
        foreach ($movableInstances as $movableInstance) {
            $statuses[$movableInstance->getUri()] = [
                'success' => $success = $this->getClassService()->changeClass($movableInstance, $destinationClass),
            ];
            if ($success === true) {
                $statuses[$movableInstance->getUri()]['message'] = sprintf(
                    'Instance "%s" has been successfully moved to "%s"', $movableInstance->getUri(), $destinationClass->getUri()
                );
            } else {
                $statuses[$movableInstance->getUri()]['message'] = sprintf('An error has occurred while persisting instance "%s"', $movableInstance->getUri());
            }
        }

        return $statuses;
    }
private function move ( \ core_kernel_classes_Class $ destinationClass , array $ movableInstances = [ ] , array $ statuses = [ ] ) { /** @var core_kernel_classes_Resource $movableInstance */ foreach ( $ movableInstances as $ movableInstance ) { $ statuses [ $ movableInstance -> getUri ( ) ] = [ 'success' => $ success = $ this -> getClassService ( ) -> changeClass ( $ movableInstance , $ destinationClass ) , ] ; if ( $ success === true ) { $ statuses [ $ movableInstance -> getUri ( ) ] [ 'message' ] = sprintf ( 'Instance "%s" has been successfully moved to "%s"' , $ movableInstance -> getUri ( ) , $ destinationClass -> getUri ( ) ) ; } else { $ statuses [ $ movableInstance -> getUri ( ) ] [ 'message' ] = sprintf ( 'An error has occurred while persisting instance "%s"' , $ movableInstance -> getUri ( ) ) ; } } return $ statuses ; }
Move movableInstances to the destinationClass

@param core_kernel_classes_Class $destinationClass class to move to
@param array $movableInstances list of instances available to move
@param array $statuses list of statuses for instances asked to be moved

@return array $statuses updated list of statuses
Move movableInstances to the destinationClass