Get request path for edit.

@return string
979262
protected function getEditPath()
    {
        $key = $this->panel->getParent()->getModel()->getKey();

        return $this->getListPath().'/'.$key.'/edit';
    }
1362099
public function getPath()
    {
        $path = $this->type === 'settings' ? $this->options['settings_config_path'] : $this->options['model_config_path'];

        return rtrim($path, '/').'/';
    }
1173767
private function getHttpPath(): ?string
    {
        $path = null;

        if (isset($_SERVER['REQUEST_URI'])) {
            $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
        }

        return $path;
    }
111394
public function editAction()
    {
        $id = $this->params()->fromRoute('id');
        if (! is_numeric($id)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The article identifier was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        try {
            $article = $this->getArticleService()->getArticle($id);
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        $form = $this->getArticleForm();
        $form->setAttribute(
            'action',
            $this->url()->fromRoute('sc-admin/article/edit', ['id' => $id])
        );
        $form->bind($article);
        if ($this->getRequest()->isPost()) {
            $form->setData($this->getRequest()->getPost());
            if ($form->isValid()) {
                $this->getArticleService()->saveContent($form->getData());
            }
        }

        return new ViewModel([
            'content' => $article,
            'form' => $form,
        ]);
    }
1085011
private function getDefaultRoutePath(): string
    {
        $pattern = $this
            ->adminConfiguration
            ->getParameter('routing_url_pattern')
        ;
        $path = str_replace('{admin}', $this->adminName, $pattern);
        $path = str_replace('{action}', $this->actionName, $path);

        if (in_array($this->actionName, ['edit', 'delete'])) {
            $path .= '/{id}';
        }

        return $path;
    }
815899
public function editAction()
    {
        $params     = $this->params();
        $request    = $this->getRequest();
        $service    = $this->getServiceLocator();
        $cid        = $params->fromQuery( 'contentId' );
        $pid        = $params->fromRoute( 'paragraphId' );
        $locale     = $service->get( 'AdminLocale' )->getCurrent();
        $model      = $service->get( 'Grid\Paragraph\Model\Dashboard\Model' );
        $permission = $service->get( 'Grid\User\Model\Permissions\Model' );
        $dashboard  = $model->setLocale( $locale )->find( $pid );
        $customize  = $permission->isAllowed( 'paragraph.customize', 'edit' );

        if ( empty( $dashboard ) )
        {
            $this->getResponse()
                 ->setStatusCode( 404 );

            return;
        }

        $paragraph = $dashboard->paragraph;

        if ( ! $paragraph->isEditable() )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        if ( $cid && $paragraph instanceof ContentDependentAwareInterface )
        {
            $content = $service->get( 'Grid\Paragraph\Model\Paragraph\Model' )
                               ->setLocale( $locale )
                               ->find( $cid );

            if ( $content instanceof AbstractRoot )
            {
                $paragraph->setDependentContent( $content );
            }
        }

        $form = $dashboard->getForm( $service->get( 'Form' ), $customize );
        $view = new ViewModel( array(
            'form'      => $form,
            'success'   => null,
        ) );

        if ( $request->isPost() )
        {
            $form->setData( $request->getPost() );
            $view->setVariable( 'success',
                                $form->isValid() && $dashboard->save() );
        }

        return $view->setTerminal( true );
    }
51040
public function getPathInfo()
    {
        if ($this->pathInfo == null) {
            if ($this->server->get('PATH_INFO')) {
                $this->pathInfo = $this->server->get('PATH_INFO');
            } else {
                $query = $this->getQueryString();
                $uri = $this->getUri();
                $this->pathInfo = rtrim(str_replace('?'.$query, '', $uri), '/');
            }
        }
        return $this->pathInfo;
    }
497510
public static function getCurrentPath()
    {
        if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
            $url = $_SERVER['HTTP_X_REWRITE_URL'];
        } elseif (isset($_SERVER['REQUEST_URI'])) {
            $url = $_SERVER['REQUEST_URI'];
        } elseif (isset($_SERVER['ORIG_PATH_INFO'])) {
            $url = $_SERVER['ORIG_PATH_INFO'] . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '');
        } else {
            $url = '';
        }

        return strpos($url, '?') ? strstr($url, '?', true) : $url;
    }
1039085
protected function _viewPath()
    {
        $viewPath = $this->name;
        if ($this->request->getParam('prefix')) {
            $prefixes = array_map(
                'Cake\Utility\Inflector::camelize',
                explode('/', $this->request->getParam('prefix'))
            );
            $viewPath = implode(DIRECTORY_SEPARATOR, $prefixes) . DIRECTORY_SEPARATOR . $viewPath;
        }

        return $viewPath;
    }
1307678
public function pathInfo() {
        $url = $this->url();
        $index = strpos($url, "?");
        if ($index) {
            $url = substr($url, 0, $index);
        }

        return $url;
    }
698719
protected function resolvePath()
    {
        if (!isset($this->server['REQUEST_URI'])) {
            return null;
        }

        $url = $this->server['REQUEST_URI'];

        if (false !== $queryStart = strpos($url, '?')) {
            $url = substr($url, 0, $queryStart);
        }

        $url = preg_replace('/^' . preg_quote($this->dir, '/') . '/', null, $url);
        $url = '/' . trim($url, '/');

        return $url;
    }
1315040
public static function getBasicPath() {
        $s = &$_SERVER;
        $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true : false;
        $sp = strtolower($s['SERVER_PROTOCOL']);
        $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');
        $port = $s['SERVER_PORT'];
        $port = ((!$ssl && $port == '80') || ($ssl && $port == '443')) ? '' : ':' . $port;
        $host = isset($s['HTTP_X_FORWARDED_HOST']) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
        $host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
        $uri = $protocol . '://' . $host;
        return $uri;
    }
512806
protected function getViewPath()
    {
        $key = $this->form->getResourceId();

        if ($key) {
            return $this->getListPath().'/'.$key;
        } else {
            return $this->getListPath();
        }
    }
602416
public function getFormElementPath()
    {
        $className = implode('', array_slice(explode('\\', get_called_class()), -1));
        $segment = substr($className, 0, strpos($className, 'Style'));
        $element = uncamelcase($segment);
        $env = Environment::get();

        return $env->getPath(DIRNAME_ELEMENTS . '/' . DIRNAME_STYLE_CUSTOMIZER . '/' . DIRNAME_STYLE_CUSTOMIZER_TYPES . '/' . $element . '.php');
    }
915714
public function getPath(): string
    {

        $query = http_build_query(
            [
                'q'      => $this->query,
                'show'   => ($this->page !== 1) ? 50 * ($this->page - 1) : null,
                'letter' => $this->char,
            ]
        );

        return sprintf(
            'https://myanimelist.net/people.php?%s',
            $query
        );
    }
199499
private function getPath()
    {
        if (($path = $this->config['path']) instanceof \Closure) {
            $this->line('Generating dynamic download path.');
            $this->line('');
            if (is_numeric($path = $path($this))) {
                exit($path);
            }
            $this->line('');
        }

        if (!is_string($path)) {
            $this->error('Path has not been provided as a string.');
            $this->line('');
            $this->line('');

            exit(1);
        }

        return $path;
    }
483794
public static function path()
    {
        $url = '';

        // Get the rest of the URL
        if (!Arr::key('REQUEST_URI', $_SERVER)) {
            // Microsoft IIS doesn't set REQUEST_URI by default
            if ($queryString = Arr::key('QUERY_STRING', $_SERVER, true)) {
                $url .= '?' . $queryString;
            }
        } else {
            $url .= $_SERVER['REQUEST_URI'];
        }

        return $url ?: null;
    }