src/Common/Traits/Model/Nestable.php
public function generateUrl($oObj)
    {
        if (empty($oObj->breadcrumbs)) {
            return null;
        }

        $aBreadcrumbs = json_decode($oObj->breadcrumbs);
        if (is_null($aBreadcrumbs)) {
            return null;
        }

        $aUrl   = arrayExtractProperty($aBreadcrumbs, 'slug');
        $aUrl[] = $oObj->slug;

        $sUrl       = implode('/', $aUrl);
        $sNamespace = defined('static::NESTED_URL_NAMESPACE') ? addTrailingSlash(static::NESTED_URL_NAMESPACE) : '';

        return $sNamespace . $sUrl;
    }
public function generateUrl($oObj)
    {
        if (empty($oObj->breadcrumbs)) {
            return null;
        }

        $aBreadcrumbs = json_decode($oObj->breadcrumbs);
        if (is_null($aBreadcrumbs)) {
            return null;
        }

        $aUrl   = arrayExtractProperty($aBreadcrumbs, 'slug');
        $aUrl[] = $oObj->slug;

        $sUrl       = implode('/', $aUrl);
        $sNamespace = defined('static::NESTED_URL_NAMESPACE') ? addTrailingSlash(static::NESTED_URL_NAMESPACE) : '';

        return $sNamespace . $sUrl;
    }
public function generateUrl ( $ oObj ) { if ( empty ( $ oObj -> breadcrumbs ) ) { return null ; } $ aBreadcrumbs = json_decode ( $ oObj -> breadcrumbs ) ; if ( is_null ( $ aBreadcrumbs ) ) { return null ; } $ aUrl = arrayExtractProperty ( $ aBreadcrumbs , 'slug' ) ; $ aUrl [ ] = $ oObj -> slug ; $ sUrl = implode ( '/' , $ aUrl ) ; $ sNamespace = defined ( 'static::NESTED_URL_NAMESPACE' ) ? addTrailingSlash ( static :: NESTED_URL_NAMESPACE ) : '' ; return $ sNamespace . $ sUrl ; }
Generates the URL for nestable objects; optionally place under a URL namespace

@param \stdClass $oObj The object to generate the URL for

@return string|null
Generates the URL for nestable objects ; optionally place under a URL namespace