class Theme implements ExtenderInterface
Methods
This can be used to override LESS files that are imported within the code.
This method allows overriding LESS file sources.
This method allows you to add custom Less functions.
Details
at
line 33
Theme
overrideLessImport(string $file, string $newFilePath, string $extensionId = null)
This can be used to override LESS files that are imported within the code.
For example, core's `forum.less` file imports a `forum/DiscussionListItem.less` file. The contents of this file can be overriden with this method.
at
line 50
Theme
overrideFileSource(string $file, string $newFilePath, string $extensionId = null)
This method allows overriding LESS file sources.
For example `forum.less`, `admin.less`, `mixins.less` and `variables.less` are file sources, and can therefore be overriden using this method.
at
line 76
Theme
addCustomLessFunction(string $functionName, callable $callable)
This method allows you to add custom Less functions.
All custom Less functions may only return numbers, strings or booleans. **Example usage:** ```php (new Extend\Theme) ->addCustomLessFunction('is-flarum', function (mixed $text) { return strtolower($text) === 'flarum' }), ```