class ServiceTools implements ServiceToolsInterface

Services related to ServiceToolsInterface

Properties

private Request $request Stores current Request
private RouterInterface $router Stores Router
private TranslatorInterface $translator Stores Translator

Methods

__construct(RequestStack $requestStack, TranslatorInterface $translator, RouterInterface $router)

No description

createFlash(string $translationDomain = null, string $text, string $style = 'success', array $options = array())

Creates flash message

string|null
getUrl(string $data)

Gets the url

array
getUrlFromRoute(string $route)

Gets url from a Route

Details

at line 43
__construct(RequestStack $requestStack, TranslatorInterface $translator, RouterInterface $router)

Parameters

RequestStack $requestStack
TranslatorInterface $translator
RouterInterface $router

at line 57
createFlash(string $translationDomain = null, string $text, string $style = 'success', array $options = array())

Creates flash message

Parameters

string $translationDomain
string $text
string $style
array $options

at line 75
string|null getUrl(string $data)

Gets the url

Parameters

string $data

Return Value

string|null

at line 94
array getUrlFromRoute(string $route)

Gets url from a Route

Parameters

string $route

Return Value

array