Jarves\Objects::getUrl PHP Method

getUrl() public method

Example: getUrl('file://45') => '/myImageFolder/Picture1.png' getUrl('news://4') => '/newspage/detail/my-news-title' getUrl('user://1') => '/userdetail/admini-strator'
public getUrl ( string $internalUrl ) : string | boolean
$internalUrl string
return string | boolean
    public function getUrl($internalUrl)
    {
        $pos = strpos($internalUrl, '://');
        $objectIds = substr($internalUrl, 0, $pos);
        $params = explode('/', substr($internalUrl, $pos + 2));
        $objectDefinition = $this->getDefinition($objectIds);
        if (!$objectDefinition) {
            return false;
        }
        if (method_exists($objectDefinition['_extension'], $objectDefinition['urlGetter'])) {
            return call_user_func(array($objectDefinition['_extension'], $objectDefinition['urlGetter']), $params);
        } else {
            return false;
        }
    }