public function convertFrom($source, $targetType, array $subProperties = [], PropertyMappingConfigurationInterface $configuration = null)
    {
        if (!is_array($source)) {
            return new Error(sprintf('Cannot convert %s to ChangeCollection.', gettype($source)));
        }

        $changeCollection = new ChangeCollection();
        foreach ($source as $changeData) {
            $convertedData = $this->convertChangeData($changeData);

            if ($convertedData instanceof Error) {
                return $convertedData;
            }

            $changeCollection->add($convertedData);
        }

        return $changeCollection;
    }
public function convertFrom($source, $targetType, array $subProperties = [], PropertyMappingConfigurationInterface $configuration = null)
    {
        if (!is_array($source)) {
            return new Error(sprintf('Cannot convert %s to ChangeCollection.', gettype($source)));
        }

        $changeCollection = new ChangeCollection();
        foreach ($source as $changeData) {
            $convertedData = $this->convertChangeData($changeData);

            if ($convertedData instanceof Error) {
                return $convertedData;
            }

            $changeCollection->add($convertedData);
        }

        return $changeCollection;
    }
public function convertFrom ( $ source , $ targetType , array $ subProperties = [ ] , PropertyMappingConfigurationInterface $ configuration = null ) { if ( ! is_array ( $ source ) ) { return new Error ( sprintf ( 'Cannot convert %s to ChangeCollection.' , gettype ( $ source ) ) ) ; } $ changeCollection = new ChangeCollection ( ) ; foreach ( $ source as $ changeData ) { $ convertedData = $ this -> convertChangeData ( $ changeData ) ; if ( $ convertedData instanceof Error ) { return $ convertedData ; } $ changeCollection -> add ( $ convertedData ) ; } return $ changeCollection ; }
Converts a accordingly formatted, associative array to a change collection

@param array $source
@param string $targetType not used
@param array $subProperties not used
@param \Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration not used
@return mixed An object or \Neos\Error\Messages\Error if the input format is not supported or could not be converted for other reasons
@throws \Exception
Converts a accordingly formatted associative array to a change collection