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