Jinya CMS

Theme extends Entity
in package
implements JsonSerializable

This class contains all information for themes that are stored in the database.

Apart from the database side, there is also filesystem theme information.

Tags

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$configuration  : array<string|int, mixed>
$description  : array<string|int, string>
$displayName  : string
$hasApiTheme  : bool
$id  : int
$name  : string
$scssVariables  : array<string, string>
findByName()  : Theme|null
Finds the theme with the given name
format()  : array<string, array<string, mixed>|int|stdClass|string|bool>
Formats the theme into an array
getActiveTheme()  : Theme|null
Gets the currently active theme
getAssets()  : array<string, ThemeAsset>
Gets all theme assets
getCategories()  : array<string, BlogCategory>
Gets all theme categories
getClassicPages()  : array<string, ClassicPage>
Gets all theme classic pages
getFiles()  : array<string, File>
Gets all theme files
getForms()  : array<string, Form>
Gets all theme forms
getGalleries()  : array<string, Gallery>
Gets all theme galleries
getMenus()  : array<string, Menu>
Gets all theme menus
getModernPages()  : array<string, ModernPage>
Gets all theme modern pages
jsonSerialize()  : mixed
makeActiveTheme()  : void
Makes the current theme active

Properties

$configuration

public array<string|int, mixed> $configuration

The stored configuration in the database

Tags

$description

public array<string|int, string> $description

The theme description

Tags

$displayName

public string $displayName

The theme display name

Tags

$hasApiTheme

public bool $hasApiTheme = false

Specifies whether the theme contains an API theme

Tags

$name

public string $name

The theme name

Tags

$scssVariables

public array<string, string> $scssVariables

A key-value store of SCSS variables changed by an artist

Tags

Methods

findByName()

Finds the theme with the given name

public static findByName(string $name) : Theme|null
Parameters
$name : string
Tags
Return values
Theme|null

format()

Formats the theme into an array

public format() : array<string, array<string, mixed>|int|stdClass|string|bool>
Tags
Return values
array<string, array<string, mixed>|int|stdClass|string|bool>

getActiveTheme()

Gets the currently active theme

public static getActiveTheme() : Theme|null
Tags
throws
Exception
Return values
Theme|null

getAssets()

Gets all theme assets

public getAssets() : array<string, ThemeAsset>
Tags
Return values
array<string, ThemeAsset>

getClassicPages()

Gets all theme classic pages

public getClassicPages() : array<string, ClassicPage>
Tags
Return values
array<string, ClassicPage>

getFiles()

Gets all theme files

public getFiles() : array<string, File>
Tags
Return values
array<string, File>

getForms()

Gets all theme forms

public getForms() : array<string, Form>
Tags
Return values
array<string, Form>

getGalleries()

Gets all theme galleries

public getGalleries() : array<string, Gallery>
Tags
Return values
array<string, Gallery>

getMenus()

Gets all theme menus

public getMenus() : array<string, Menu>
Tags
Return values
array<string, Menu>

getModernPages()

Gets all theme modern pages

public getModernPages() : array<string, ModernPage>
Tags
Return values
array<string, ModernPage>

jsonSerialize()

public jsonSerialize() : mixed
Tags
Return values
mixed

makeActiveTheme()

Makes the current theme active

public makeActiveTheme() : void
Tags
Return values
void

Search results