final class RequestViewHelpers (View source)

Methods

__construct(ServerRequestInterface $request, UrlGenerator $urlGenerator, FlashBagInterface|null $flash = null, SessionInterface|null $session = null)
mixed
old(string $key, mixed $default = '')
mixed
mixed
flash(string $key, mixed $default = null)
mixed
string
string
string
string
string
currentUrl(bool $withQuery = true)
string
string
currentFullUrl(bool $withQuery = true)
string
bool
isUrlActive(string $url, bool $startsWith = false)
bool
bool
isRouteActive(string $route, array $params = [], bool $startsWith = false)
bool

Details

__construct

__construct(ServerRequestInterface $request, UrlGenerator $urlGenerator, FlashBagInterface|null $flash = null, SessionInterface|null $session = null)

No description

Parameters

ServerRequestInterface $request
UrlGenerator $urlGenerator
FlashBagInterface|null $flash
SessionInterface|null $session

old

mixed old(string $key, mixed $default = '')

No description

Parameters

string $key
mixed $default

Return Value

mixed

flash

mixed flash(string $key, mixed $default = null)

No description

Parameters

string $key
mixed $default

Return Value

mixed

currentPath

string currentPath()

No description

Return Value

string

currentQuery

string currentQuery()

No description

Return Value

string

currentUrl

string currentUrl(bool $withQuery = true)

No description

Parameters

bool $withQuery

Return Value

string

currentFullUrl

string currentFullUrl(bool $withQuery = true)

No description

Parameters

bool $withQuery

Return Value

string

isUrlActive

bool isUrlActive(string $url, bool $startsWith = false)

No description

Parameters

string $url
bool $startsWith

Return Value

bool

isRouteActive

bool isRouteActive(string $route, array $params = [], bool $startsWith = false)

No description

Parameters

string $route
array $params
bool $startsWith

Return Value

bool