Neos\Flow\Mvc\Routing\IdentityRoutePart::resolveValue PHP Method

resolveValue() protected method

Resolves the given entity and sets the value to a URI representation (path segment) that matches $this->uriPattern and is unique for the given object.
protected resolveValue ( mixed $value ) : boolean
$value mixed
return boolean TRUE if the object could be resolved and stored in $this->value, otherwise FALSE.
    protected function resolveValue($value)
    {
        $identifier = null;
        if (is_array($value) && isset($value['__identity'])) {
            $identifier = $value['__identity'];
        } elseif ($value instanceof $this->objectType) {
            $identifier = $this->persistenceManager->getIdentifierByObject($value);
        }
        if ($identifier === null || !is_string($identifier) && !is_integer($identifier)) {
            return false;
        }
        $pathSegment = $this->getPathSegmentByIdentifier($identifier);
        if ($pathSegment === null) {
            return false;
        }
        $this->value = $pathSegment;
        return true;
    }