aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/en/developers/03_Backend/05_Extensions.md4
-rw-r--r--docs/fr/developers/03_Backend/05_Extensions.md6
2 files changed, 6 insertions, 4 deletions
diff --git a/docs/en/developers/03_Backend/05_Extensions.md b/docs/en/developers/03_Backend/05_Extensions.md
index cf0fa3386..aeb693cba 100644
--- a/docs/en/developers/03_Backend/05_Extensions.md
+++ b/docs/en/developers/03_Backend/05_Extensions.md
@@ -116,7 +116,9 @@ The `Minz_Extension` abstract class defines a set of methods that can be overrid
The `Minz_Extension` abstract class defines another set of methods that should not be overridden:
* the `getName`, `getEntrypoint`, `getPath`, `getAuthor`, `getDescription`, `getVersion`, and `getType` methods return the extension internal properties. Those properties are extracted from the `metadata.json` file.
-* the `getFileUrl` returns the URL of the selected file. The file must exist in the `static` folder of the extension.
+* `getFileUrl(string $filename, bool $isStatic = true): string` will return the URL to a file in the `static` directory.
+ The first parameter is the name of the file (without `static/`).
+ Set `$isStatic` to true for user-independent files, and to `false` for files saved in a user’s own directory.
* the `registerController` method register an extension controller in FreshRSS. The selected controller must be defined in the extension *Controllers* folder, its file name must be `\<name\>Controller.php`, and its class name must be `FreshExtension_\<name\>_Controller`.
* the `registerViews` method registers the extension views in FreshRSS.
* the `registerTranslates` method registers the extension translation files in FreshRSS.
diff --git a/docs/fr/developers/03_Backend/05_Extensions.md b/docs/fr/developers/03_Backend/05_Extensions.md
index af6c7911a..728d5c843 100644
--- a/docs/fr/developers/03_Backend/05_Extensions.md
+++ b/docs/fr/developers/03_Backend/05_Extensions.md
@@ -171,9 +171,9 @@ Your class will benefit from four methods to redefine:
`getName()`, `getEntrypoint()`, `getPath()` (allows you to retrieve the
path to your extension), `getAuthor()`, `getDescription()`,
`getVersion()`, `getType()`.
-* `getFileUrl($filename, $type)` will return the URL to a file in the
- `static` directory. The first parameter is the name of the file (without
- `static /`), the second is the type of file to be used (`css` or `js`).
+* `getFileUrl(string $filename, bool $isStatic = true): string` will return the URL to a file in the `static` directory.
+ The first parameter is the name of the file (without `static/`).
+ Set `$isStatic` to true for user-independent files, and to `false` for files saved in a user’s own directory.
* `registerController($base_name)` will tell Minz to take into account the
given controller in the routing system. The controller must be located in
your `Controllers` directory, the name of the file must be `<base_name>Controller.php` and the name of the