src/Control/RequestHandler.php
public function Link($action = null)
    {
        // Check configured url_segment
        $url = $this->config()->get('url_segment');
        if ($url) {
            $link = Controller::join_links($url, $action, '/');

            // Give extensions the chance to modify by reference
            $this->extend('updateLink', $link, $action);
            return $link;
        }

        // no link defined by default
        trigger_error(
            'Request handler ' . static::class . ' does not have a url_segment defined. ' . 'Relying on this link may be an application error',
            E_USER_WARNING
        );
        return null;
    }
public function Link($action = null)
    {
        // Check configured url_segment
        $url = $this->config()->get('url_segment');
        if ($url) {
            $link = Controller::join_links($url, $action, '/');

            // Give extensions the chance to modify by reference
            $this->extend('updateLink', $link, $action);
            return $link;
        }

        // no link defined by default
        trigger_error(
            'Request handler ' . static::class . ' does not have a url_segment defined. ' . 'Relying on this link may be an application error',
            E_USER_WARNING
        );
        return null;
    }
public function Link ( $ action = null ) { // Check configured url_segment $ url = $ this -> config ( ) -> get ( 'url_segment' ) ; if ( $ url ) { $ link = Controller :: join_links ( $ url , $ action , '/' ) ; // Give extensions the chance to modify by reference $ this -> extend ( 'updateLink' , $ link , $ action ) ; return $ link ; } // no link defined by default trigger_error ( 'Request handler ' . static :: class . ' does not have a url_segment defined. ' . 'Relying on this link may be an application error' , E_USER_WARNING ) ; return null ; }
Returns a link to this controller. Overload with your own Link rules if they exist.

@param string $action Optional action
@return string
Returns a link to this controller . Overload with your own Link rules if they exist .