I want to create an url for a predefined route, but for a static source. When I provide an array with parameters to the $url->get() method it's working fine but giving me the default base url. When using the ->setStatic() it's ginging me the following warning:
Notice: Array to string conversion in
Also the result isnt't correct (as expected). See:
My code:
$url = DI::getDefault()->get('url');
return $url->getStatic(array(
'for' => 'get-user-image',
'uid' => $userUid,
'file' => $file
));
And the documentation says:
/**
* Generates a URL for a static resource
*
* @param string|array $uri
* @return string
*/
public function getStatic($uri=null){ }