class Theme implements ExtenderInterface

Methods

overrideLessImport(string $file, string $newFilePath, string $extensionId = null)

<p>This can be used to override LESS files that are imported within the code.</p>

overrideFileSource(string $file, string $newFilePath, string $extensionId = null)

<p>This method allows overriding LESS file sources.</p>

extend(Container $container, Extension $extension = null)

No description

Details

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>

Parameters

string $file <p>: Relative path of the file to override, for example: <code>forum/Hero.less</code></p>
string $newFilePath <p>: Absolute path of the new file.</p>
string $extensionId <p>: If overriding an extension file, specify its ID, for example: <code>flarum-tags</code>.</p>

Return Value

Theme

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>

Parameters

string $file <p>: Name of the file to override, for example: <code>admin.less</code></p>
string $newFilePath <p>: Absolute path of the new file.</p>
string $extensionId <p>: If overriding an extension file, specify its ID, for example: <code>flarum-tags</code>.</p>

Return Value

Theme

extend(Container $container, Extension $extension = null)

Parameters

Container $container
Extension $extension