Clickalicious\PhpMemAdmin\App::getLinkForAction PHP Method

getLinkForAction() protected method

Returns the link to the phpMemAdmin installation with optional action argument.
Author: Benjamin Carl ([email protected])
protected getLinkForAction ( integer $action = null, array $arguments = [] ) : string
$action integer The action to attach
$arguments array The arguments to attach to URL
return string The link to phpMemAdmin
    protected function getLinkForAction($action = null, array $arguments = array())
    {
        $link = $_SERVER['PHP_SELF'];
        $link = $link . ($action !== null) ? '?action=' . $action : '';
        foreach ($arguments as $key => $value) {
            $link .= '&' . $key . '=' . $value;
        }
        return $link;
    }