public function hashToFieldValue($fieldValue, array $context = array())
    {
        if (is_string($fieldValue)) {
            $xmlText = $fieldValue;
        } else if (is_array($fieldValue) && isset($fieldValue['xml'])) {
            // native export format from eZ
            $xmlText = $fieldValue['xml'];
        } else {
            $xmlText = $fieldValue['content'];
        }

        // Check if there are any references in the xml text and replace them. Please phpstorm.
        $resolver = $this->referenceResolver;
        /** @var EmbeddedReferenceResolverInterface $resolver */
        return $resolver->resolveEmbeddedReferences($xmlText);
    }
public function hashToFieldValue($fieldValue, array $context = array())
    {
        if (is_string($fieldValue)) {
            $xmlText = $fieldValue;
        } else if (is_array($fieldValue) && isset($fieldValue['xml'])) {
            // native export format from eZ
            $xmlText = $fieldValue['xml'];
        } else {
            $xmlText = $fieldValue['content'];
        }

        // Check if there are any references in the xml text and replace them. Please phpstorm.
        $resolver = $this->referenceResolver;
        /** @var EmbeddedReferenceResolverInterface $resolver */
        return $resolver->resolveEmbeddedReferences($xmlText);
    }
public function hashToFieldValue ( $ fieldValue , array $ context = array ( ) ) { if ( is_string ( $ fieldValue ) ) { $ xmlText = $ fieldValue ; } else if ( is_array ( $ fieldValue ) && isset ( $ fieldValue [ 'xml' ] ) ) { // native export format from eZ $ xmlText = $ fieldValue [ 'xml' ] ; } else { $ xmlText = $ fieldValue [ 'content' ] ; } // Check if there are any references in the xml text and replace them. Please phpstorm. $ resolver = $ this -> referenceResolver ; /** @var EmbeddedReferenceResolverInterface $resolver */ return $ resolver -> resolveEmbeddedReferences ( $ xmlText ) ; }
Replaces any references in an xml string to be used as the input data for an ezxmltext field.

@param string|array $fieldValue The definition of teh field value, structured in the yml file. Either a string, or an array with key 'content'
@param array $context The context for execution of the current migrations. Contains f.e. the path to the migration
@return string

@todo replace objects and location refs in eznode and ezobject links
Replaces any references in an xml string to be used as the input data for an ezxmltext field .