This function shows the absolute path to a file in the widgets directory. The name of the file needs to be given as parameter.
Parameter |
Type |
Description |
|---|---|---|
$fileName |
string |
Name of the file whose path is required (with extension) |
Using this method ensures that paths do not need to be adjusted when you move or rename the widget.
Example:
$csvFilePath = $this->getWidgetFilePath('myFile.csv');