Get a relative (to the root url of the site) link to this
controller

@param string $action The action you want to add to the link
@return string
511579
public function RelativeLink($action = null)
    {
        return Controller::join_links(
            Director::baseURL(),
            $this->Link($action)
        );
    }
609154
protected function getBasePath(string $action) : string
	{
		return sprintf(
			'project/%s/%s?key=%s',
			$this->getProjectId(),
			$action,
			$this->getApiKey()
		);
	}
922080
protected function convertToControllerAction($action)
    {
        if (is_string($action)) {
            $action = ['uses' => $action];
        }

        // Here we'll merge any group "uses" statement if necessary so that the action
        // has the proper clause for this property. Then we can simply set the name
        // of the controller on the action and return the action array for usage.
        if (! empty($this->groupStack)) {
            $action['uses'] = $this->prependGroupNamespace($action['uses']);
        }

        // Here we will set this controller name on the action array just so we always
        // have a copy of it for reference if we need it. This can be used while we
        // search for a controller name or do some other type of fetch operation.
        $action['controller'] = $action['uses'];

        return $action;
    }
876636
public function Link($action = null)
    {
        if (!$action
            && Member::currentUserID()
            && !$this->AllowProfileEditing
            && $this->CanAddMembers()
        ) {
            $action = 'add';
        }

        return parent::Link($action);
    }
1315860
public function Link($action = null)
    {
        if (!$action) {
            $action = $this->sanitiseClassName($this->modelClass);
        }
        return parent::Link($action);
    }
965521
public function Link($action = null)
    {
        $link = Controller::join_links(
            AdminRootController::admin_url(),
            $this->config()->get('url_segment'), // in case we want to change the segment
            '/', // trailing slash needed if $action is null!
            "$action"
        );
        $this->extend('updateLink', $link);
        return $link;
    }
547166
protected function redirectToAction($action)
    {
        return $this->response->redirect([
            'for' => $this->router->getMatchedRoute()->getName(),
            'action' => $action
        ]);
    }
325440
protected function getActionPath(string $action): string
    {
        $modelName = $this->getModelName();
        $viewName  = $modelName.ucfirst($action).'.js';

        return resource_path('assets/admin/src/views/'.pluralize($modelName).'/'.$viewName);
    }
48591
public function AbsoluteLink($action = null) {

		$parent = $this->getParent();
		if(!$parent) {
			return null;
		}
		$date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting ?: 'y/MM/dd/') : '';
		$link = $parent->AbsoluteLink() . "{$date}{$this->URLSegment}/";
		if($action) {
			$link .= "{$action}/";
		}
		return $link;
	}
53368
public function actionUrl($action = null, $path = null)
    {
        if ($action === null) {
            $action = $this->action;
        }

        $class = get_called_class();
        $uriPath = dirname(dirname(strtolower(str_replace('\\', '/', $class))));
        $controllerName = strtolower(class_basename($class));

        $url = $uriPath.'/'.$controllerName.'/'.$action;
        if ($path) {
            $url .= '/'.$path;
        }

        return Backend::url($url);
    }
940156
public function Link($action = null)
    {
        return Controller::join_links(
            parent::Link(),
            $this->config()->url_segment,
            $action
        );
    }
579758
public function action($action = null)
    {
        if (!is_null($action)) {
            $this->action = $action;
            return $this;
        } else {
            return $this->action ?: '';
        }
    }
491559
protected function action($action)
    {
        $action = in_array($action, $this->actions) ? $action : null;
        $action = array_key_exists($action, $this->aliases) ? $this->aliases[$action] : $action;

        return $action;
    }
828125
public function Link($action = null)
    {
        if ($this->hasParentPage()) {
            return Controller::join_links(
                $this->hasParentPage()->Link(),
                $this->hasViewAction(),
                $this->owner->RelativeLink($action)
            );
        }

        return false;
    }
499993
protected function routingToController($action)
	{
		if ($action instanceof Closure) return false;

		return is_string($action) || is_string(array_get($action, 'uses'));
	}
575071
public function Link($action = null)
    {
        // Forms without parent controller have no link;
        // E.g. Submission handled via graphql
        $controller = $this->form->getController();
        if (empty($controller)) {
            return null;
        }

        // Respect FormObjectLink() method
        if ($controller->hasMethod("FormObjectLink")) {
            $base = $controller->FormObjectLink($this->form->getName());
        } else {
            $base = Controller::join_links($controller->Link(), $this->form->getName());
        }

        // Join with action and decorate
        $link = Controller::join_links($base, $action, '/');
        $this->extend('updateLink', $link, $action);
        return $link;
    }
576608
public function getActionLink($controller, $action = 'index', $remove = false)
    {
        $key = $this->_getKey($controller, $action);

        if ($this->offsetExists($key)) {

            $result = $this->toActionLink($key);

            if ($remove) {
                $this->offsetUnset($key);
            }

            return $result;
        }
    }