public function fromString($objectAttribute, $string)
    {
        try {
            $value = $this->fieldType->acceptValue($string);
        } catch (InvalidArgumentException $e) {
            return false;
        }

        $errors = $this->fieldType->validate(new FieldDefinition(), $value);
        if (!empty($errors)) {
            return false;
        }

        $objectAttribute->setContent($value);

        return true;
    }
public function fromString($objectAttribute, $string)
    {
        try {
            $value = $this->fieldType->acceptValue($string);
        } catch (InvalidArgumentException $e) {
            return false;
        }

        $errors = $this->fieldType->validate(new FieldDefinition(), $value);
        if (!empty($errors)) {
            return false;
        }

        $objectAttribute->setContent($value);

        return true;
    }
public function fromString ( $ objectAttribute , $ string ) { try { $ value = $ this -> fieldType -> acceptValue ( $ string ) ; } catch ( InvalidArgumentException $ e ) { return false ; } $ errors = $ this -> fieldType -> validate ( new FieldDefinition ( ) , $ value ) ; if ( ! empty ( $ errors ) ) { return false ; } $ objectAttribute -> setContent ( $ value ) ; return true ; }
Creates the content object attribute from string representation.

@param eZContentObjectAttribute $objectAttribute
@param string $string

@return bool
Creates the content object attribute from string representation .