Return a link to this request handler.
The link returned is supplied in the constructor

@param null|string $action
@return string
336662
public function link($action = null)
    {
        if ($action) {
            return Controller::join_links($this->link, $action);
        }

        return $this->link;
    }
877543
public function action(String $action = NULL)
    {
        $time = $this->redirect['time'];
        $data = $this->redirect['data'];

        $this->redirect = [];

        if( strstr(get_called_class() , 'Refresh') )
        {
            $exit = false;
            $type = 'refresh';
        }
        
        $this->location($action, $time, $data, $exit ?? true, $type ?? 'location');
    }
748552
public function Link($action = null)
    {
        if ($this->data()->virtualOwner) {
            $controller = ElementController::create($this->data()->virtualOwner);

            return $controller->Link($action);
        }

        return parent::Link($action);
    }
1080914
function Link($action = null) {
		$cur = Controller::curr();
		if ($cur instanceof ExternalContentPage_Controller) {
			return $cur->data()->LinkFor($this, 'view');
		}
		return ExternalContentPage_Controller::URL_STUB . '/view/' . $this->ID;
	}
1133416
public function open($action = "/", $attributes = null)
    {
        return '<form action="'.$action.'"'. (($attributes !== null) ? $this->attributes($attributes) : "") . '>';
    }
814620
public function Link($action = null)
    {
        $controller = Injector::inst()->create(ShoppingCartController::class);
        return $controller->Link($action);
    }
946495
public function Link($action = null)
    {
        return Controller::join_links(
            Director::BaseURL(),
            $this->config()->url_segment,
            $action
        );
    }
645173
private function getActionFromParam($action)
    {
        $action = str_replace("-", "_", $action);
        if (substr($action, -1) === "/") {
            $action = substr($action, 0, -1);
        }

        return lcfirst(Inflector::camelize($action));
    }
695820
protected function getTemplateFile(string $action = null) : string
    {
        $path = '/controller/' . lcfirst($this->getControllerName()) . '/';

        return $path . ($action ? $action : $this->getActionName());
    }
1065220
protected function getActionUrl($action) : string
    {
        $context = Context::getInstance();
        return $context->getUrl($context->getParameter('controller_path') . $action);
    }
514296
protected function actionLink($action, $member = null)
    {
        if (!$member) {
            $member = Member::currentUser();
        }
        if (!$member) {
            return false;
        }

        /**
         * @todo: How do we handle "DataObject" instances that don't have a Link to reject/spam/delete?? This may
         * we have to make CMS a hard dependency instead.
         */
        // if (!$this->Parent()->hasMethod('Link')) {
        //     return false;
        // }

        $url = Controller::join_links(
            Director::baseURL(),
            'comments',
            $action,
            $this->ID
        );

        // Limit access for this user
        $token = $this->getSecurityToken();
        return $token->addToUrl($url, $member);
    }
297927
protected function getActionPath(string $action): string
    {
        $modelName = $this->getModelName();
        $nameSpace = ucfirst($modelName);

        $className = ucfirst(Str::camel($action)).'Request';

        return app_path('Http/Requests/Api/Admin/'.$nameSpace.'/'.$className.'.php');
    }
1071946
public function getActionResult($action = null)
    {
        $result = $this->results;

        if (!empty($action)) {
            $result = $this->results[$action];
        }

        return $result;
    }
560692
public function actionClass(string $action): string
    {
        switch ($action) {
            case ModelHistory::ACTION_CREATE:
                $class = 'success';
                break;
            case ModelHistory::ACTION_DELETE:
                $class = 'danger';
                break;
            case ModelHistory::ACTION_COMMENT:
                $class = 'active';
                break;
            case ModelHistory::ACTION_UPDATE:
            default:
                $class = 'info';
                break;
        }

        return $class;
    }
693616
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;
    }
836017
public function url($action, $params=[]) {
		if(is_array($action))
			return $this->resolver->url($action, $params);
		else
			return $this->resolver->url([get_called_class(), $action], $params);
	}
975798
public function toRoute($action, $params=[])
    {
        $params = (array)$params;
        $url = URL::route($this->routePrefix . '.' . $action, $params);

        if ($passThruParams = $this->getPassThruParams()) {
            $url .= '?' . http_build_query($passThruParams);
        }

        return $url;

    }