protected function getOptionValueScalar($valueElement)
    {
        if (is_object($valueElement)) {
            if ($this->hasArgument('optionValueField')) {
                return ObjectAccess::getPropertyPath($valueElement, $this->arguments['optionValueField']);
            } elseif ($this->persistenceManager->getIdentifierByObject($valueElement) !== null) {
                return $this->persistenceManager->getIdentifierByObject($valueElement);
            } else {
                return (string)$valueElement;
            }
        } else {
            return $valueElement;
        }
    }
protected function getOptionValueScalar($valueElement)
    {
        if (is_object($valueElement)) {
            if ($this->hasArgument('optionValueField')) {
                return ObjectAccess::getPropertyPath($valueElement, $this->arguments['optionValueField']);
            } elseif ($this->persistenceManager->getIdentifierByObject($valueElement) !== null) {
                return $this->persistenceManager->getIdentifierByObject($valueElement);
            } else {
                return (string)$valueElement;
            }
        } else {
            return $valueElement;
        }
    }
protected function getOptionValueScalar ( $ valueElement ) { if ( is_object ( $ valueElement ) ) { if ( $ this -> hasArgument ( 'optionValueField' ) ) { return ObjectAccess :: getPropertyPath ( $ valueElement , $ this -> arguments [ 'optionValueField' ] ) ; } elseif ( $ this -> persistenceManager -> getIdentifierByObject ( $ valueElement ) !== null ) { return $ this -> persistenceManager -> getIdentifierByObject ( $ valueElement ) ; } else { return ( string ) $ valueElement ; } } else { return $ valueElement ; } }
Get the option value for an object

@param mixed $valueElement
@return string
Get the option value for an object