src/Controller/PageAdminController.php
public function getPathAction(Request $request)
    {
        $id = $request->get('page_id');

        $getPath = $request->get('path');

        $object = $this->admin->getObject($id);
        if ($id && $object) {
            $path = $object->getFullPath();
        } else {
            $path = '/';
        }

        $getPath = Urlizer::urlize($getPath);

        return $this->renderJson(['path' => $path.$getPath]);
    }
public function getPathAction(Request $request)
    {
        $id = $request->get('page_id');

        $getPath = $request->get('path');

        $object = $this->admin->getObject($id);
        if ($id && $object) {
            $path = $object->getFullPath();
        } else {
            $path = '/';
        }

        $getPath = Urlizer::urlize($getPath);

        return $this->renderJson(['path' => $path.$getPath]);
    }
public function getPathAction ( Request $ request ) { $ id = $ request -> get ( 'page_id' ) ; $ getPath = $ request -> get ( 'path' ) ; $ object = $ this -> admin -> getObject ( $ id ) ; if ( $ id && $ object ) { $ path = $ object -> getFullPath ( ) ; } else { $ path = '/' ; } $ getPath = Urlizer :: urlize ( $ getPath ) ; return $ this -> renderJson ( [ 'path' => $ path . $ getPath ] ) ; }
Return a json array with the calculated path for a page object.

@param Request $request

@internal param string $path

@return Response
Return a json array with the calculated path for a page object .