Return the link for this {@link Category}


@param string $action See {@link Link()}
@return string
171753
public function RelativeLink($action = null)
    {
        $link = Controller::join_links(
            $this->ID,
            $action
        );
		
		$this->extend('updateRelativeLink', $link, $action);

        return $link;
	}
40618
static public function nodeIDFromAction( $action )
    {
        $nodeID = false;
        $pos = strpos( $action, 'eznode:' );
        if ( $pos === 0 ) // make sure $action starts from 'eznode:'
            $nodeID = substr( $action, strlen( 'eznode:' ) );

        return $nodeID;
    }
579774
public function getMethodByAction($action)
    {
        foreach ($this->methods as $method => $actions) {
            if (in_array($action, $actions)) {
                return $method;
            }
        }

        return 'get';
    }
579758
public function action($action = null)
    {
        if (!is_null($action)) {
            $this->action = $action;
            return $this;
        } else {
            return $this->action ?: '';
        }
    }
1165642
public static function getActionUrl($action = 'index', $params = [])
    {
        $params = is_array($params) ? $params : ['id' => $params];

        return array_merge([implode('/', ['', static::moduleId(), static::controllerId(), $action])], $params);
    }
1245877
protected function parseAction($action)
    {
        if ($action === $this->fullController) {
            return $this->action = null;
        }

        $this->action = strtolower(
            preg_replace(['/^get/', '/^post/', '/^put/', '/^patch/', '/^delete/'], '', $action)
        );
    }
1242204
public function AbsoluteLink($action = null)
    {
        if ($this->owner->hasMethod('alternateAbsoluteLink')) {
            return $this->owner->alternateAbsoluteLink($action);
        } else {
            return Director::absoluteURL($this->owner->Link($action));
        }
    }
74794
public function Link($action = null)
    {
        return Controller::join_links(Director::absoluteURL($this->link), $action);
    }
814620
public function Link($action = null)
    {
        $controller = Injector::inst()->create(ShoppingCartController::class);
        return $controller->Link($action);
    }
975162
public function getViewer($action)
    {
        // Manually set templates should be dealt with by Controller::getViewer()
        if (!empty($this->templates[$action])
            || !empty($this->templates['index'])
            || $this->template
        ) {
            return parent::getViewer($action);
        }

        // Prepare action for template search
        $action = $action === 'index' ? '' : '_' . $action;

        $templatesFound = [];
        // Find templates for the record + action together - e.g. Page_action.ss
        if ($this->dataRecord instanceof SiteTree) {
            $templatesFound[] = $this->dataRecord->getViewerTemplates($action);
        }

        // Find templates for the controller + action together - e.g. PageController_action.ss
        $templatesFound[] = SSViewer::get_templates_by_class(static::class, $action, Controller::class);

        // Find templates for the record without an action - e.g. Page.ss
        if ($this->dataRecord instanceof SiteTree) {
            $templatesFound[] = $this->dataRecord->getViewerTemplates();
        }

        // Find the templates for the controller without an action - e.g. PageController.ss
        $templatesFound[] = SSViewer::get_templates_by_class(static::class, "", Controller::class);

        $templates = array_merge(...$templatesFound);
        return SSViewer::create($templates);
    }
1069948
public function getViewLocation($action)
    {
        if (request()->ajax()) {
            return $this->module.$this->theme.$this->resourceName.'ajax.'.$action;
        }

        return $this->module.$this->theme.$this->resourceName.$action;
    }
393272
public function Link($action = null)
    {
        if (!$this->form) {
            throw new LogicException(
                'Field must be associated with a form to call Link(). Please use $field->setForm($form);'
            );
        }

        $link = Controller::join_links($this->form->FormAction(), 'field/' . $this->name, $action);
        $this->extend('updateLink', $link, $action);
        return $link;
    }
860381
protected function actionReferencesController($action)
    {
        if (! $action instanceof Closure) {
            return is_string($action) || (isset($action['uses']) && is_string($action['uses']));
        }

        return false;
    }
547166
protected function redirectToAction($action)
    {
        return $this->response->redirect([
            'for' => $this->router->getMatchedRoute()->getName(),
            'action' => $action
        ]);
    }
412699
public function Link($action='') {
		if (strlen($this->ExternalURL) && !strlen($this->Content)) {
			// redirect away
			return $this->ExternalURL;
		}
		if ($this->InternalFile()->ID) {
			$file = $this->InternalFile();
			return $file->Link($action);
		}
		return parent::Link($action);
	}
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);
	}
374715
protected function createView($action='view')
    {
        $view = (new \Stack\View)->byName($this->getModelName(), 'Model_' . ucfirst($action));
        $view['controller'] = $this->getModelName();
        $view['controllerAction'] = $action;
        return $view;
    }