Craft Themes (4.x)

Themes extends Plugin
in package
Uses Ecommerce, SuperTable, Neo

Main plugin class

Table of Contents

EDITION_LITE  = 'lite'
EDITION_PRO  = 'pro'
EVENT_RELATED_PLUGINS  = 'related_plugins'
$hasCpSection  : bool
$hasCpSettings  : bool
$plugin  : Themes
$schemaVersion  : string
$_relatedPlugins  : array<string|int, mixed>
Plugins related to themes (which define displayers/fields etc) This is used to rebuild layouts/displays when such a plugin is installed/uninstalled
editions()  : array<string|int, mixed>
getCpNavItem()  : array<string|int, mixed>|null
getRelatedPlugins()  : array<string|int, mixed>
Get all plugins handles that are related to themes.
init()  : void
inheritDoc
isPluginRelated()  : bool
Is a plugin related to themes
_initEcommerce()  : mixed
_initNeo()  : mixed
_initSuperTable()  : mixed
afterUninstall()  : void
createSettingsModel()  : Settings
initEcommerce()  : mixed
initNeo()  : mixed
initSuperTable()  : mixed
registerBehaviors()  : mixed
Attach custom behaviors to Entry types, Global sets, Category group, Volumes and Tags
registerClearCacheEvent()  : mixed
Registers Clear cache options
registerCpHooks()  : mixed
Modify some cp pages through hooks
registerCpRoutes()  : mixed
Register cp routes
registerElementsEvents()  : mixed
registerPermissions()  : mixed
Registers permissions
registerPluginsEvents()  : mixed
Register to events related to plugins
registerProjectConfig()  : mixed
Registers project config events
registerServices()  : mixed
Register services
registerShortcuts()  : mixed
Register front end shortcuts
registerTwig()  : mixed
Modify twig
registerUtility()  : mixed
Register templates utility
settingsHtml()  : string
registerDebugPanel()  : void
Register debug panel

Constants

EDITION_LITE

public string EDITION_LITE = 'lite'

EDITION_PRO

public string EDITION_PRO = 'pro'
public string EVENT_RELATED_PLUGINS = 'related_plugins'
Tags
since
3.1.0

Properties

$hasCpSection

public bool $hasCpSection = true
Tags
inheritdoc

$hasCpSettings

public bool $hasCpSettings = true
Tags
inheritdoc

$schemaVersion

public string $schemaVersion = '5.0.0'
Tags
inheritdoc

$_relatedPlugins

Plugins related to themes (which define displayers/fields etc) This is used to rebuild layouts/displays when such a plugin is installed/uninstalled

protected array<string|int, mixed> $_relatedPlugins
Tags
since
3.1.0

Methods

editions()

public static editions() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getCpNavItem()

public getCpNavItem() : array<string|int, mixed>|null
Tags
inheritDoc
Return values
array<string|int, mixed>|null

getRelatedPlugins()

Get all plugins handles that are related to themes.

public getRelatedPlugins() : array<string|int, mixed>

This list will keep track of plugins for which (un)installation will trigger layouts to be rebuilt

Tags
since
3.1.0
Return values
array<string|int, mixed>

init()

inheritDoc

public init() : void
Return values
void

isPluginRelated()

Is a plugin related to themes

public isPluginRelated(string $handle) : bool
Parameters
$handle : string
Tags
since
3.1.0
Return values
bool

_initEcommerce()

protected _initEcommerce() : mixed
Return values
mixed

_initNeo()

protected _initNeo() : mixed
Return values
mixed

_initSuperTable()

protected _initSuperTable() : mixed
Return values
mixed

afterUninstall()

protected afterUninstall() : void
Tags
inheritDoc
Return values
void

initEcommerce()

protected initEcommerce() : mixed
Return values
mixed

initNeo()

protected initNeo() : mixed
Return values
mixed

initSuperTable()

protected initSuperTable() : mixed
Return values
mixed

registerBehaviors()

Attach custom behaviors to Entry types, Global sets, Category group, Volumes and Tags

protected registerBehaviors() : mixed
Return values
mixed

registerClearCacheEvent()

Registers Clear cache options

protected registerClearCacheEvent() : mixed
Return values
mixed

registerCpHooks()

Modify some cp pages through hooks

protected registerCpHooks() : mixed
Return values
mixed

registerCpRoutes()

Register cp routes

protected registerCpRoutes() : mixed
Return values
mixed

registerElementsEvents()

protected registerElementsEvents() : mixed
Return values
mixed

registerPermissions()

Registers permissions

protected registerPermissions() : mixed
Return values
mixed

registerPluginsEvents()

Register to events related to plugins

protected registerPluginsEvents() : mixed
Return values
mixed

registerProjectConfig()

Registers project config events

protected registerProjectConfig() : mixed
Return values
mixed

registerServices()

Register services

protected registerServices() : mixed
Return values
mixed

registerShortcuts()

Register front end shortcuts

protected registerShortcuts() : mixed
Return values
mixed

registerTwig()

Modify twig

protected registerTwig() : mixed
Return values
mixed

registerUtility()

Register templates utility

protected registerUtility() : mixed
Tags
since
4.2.0
Return values
mixed

settingsHtml()

protected settingsHtml() : string
Tags
inheritDoc
Return values
string

registerDebugPanel()

Register debug panel

private registerDebugPanel() : void
Tags
since
5.0.0
Return values
void

Search results