With this function you can create the URL for a file in the widgets directory. The file name is expected as passing parameter.
Parameter |
Type |
Description |
|---|---|---|
$fileName |
string |
Name of the file whose path is needed (including file ending) |
The use of this method ensures that URLs don't have to be adapted when they are moved or renamed, and file modifications are recognized automatically.
Please note: This function may not be used for PHP files.
Example:
$fileUrl = $this->getWidgetFileUrl('myFile.jpg');