Craft Themes (3.x)

ScssService extends Service
in package

Table of Contents

CSS_DEST_FOLDER  = '@storage/runtime/scss/dest'
CSS_SRC_FOLDER  = '@storage/runtime/scss/src'
DEST_FILE  = 'compiled.css'
clearCaches()  : mixed
Clear all scss and css files
compileInlineFile()  : mixed
Compile a scss file called in a template, identified by a hash then registers the css on the view
compileInlineScss()  : mixed
Compile some scss defined in a template, identified by a hash then registers the css on the view
blockCacheService()  : BlockCacheService
Get the block cache service
blockProviderService()  : BlockProvidersService
Get the block providers service
blocksService()  : BlockService
Get the blocks service
displayService()  : DisplayService
Get the display service
eagerLoadingService()  : EagerLoadingService
Get the eager loading service
fieldDisplayersService()  : FieldDisplayerService
Get the field displayers service
fieldsService()  : FieldsService
Get the fields service
fileDisplayerService()  : FileDisplayerService
Get the file displayers service
getDestFile()  : string
Get a destination file path identified by a hash
getSrcFile()  : string
Get a source file path identified by a hash
groupsService()  : GroupsService
Get the groups service
layoutService()  : LayoutService
Get the layout service
matrixService()  : MatrixService
Get the matrix service
registerInlineCssFile()  : mixed
Register a css file on the view
themesRegistry()  : ThemesRegistry
Get the themes registry
triggerEvent()  : mixed
Triggers an event
viewModesService()  : ViewModeService
Get the view mode service
viewService()  : ViewService
Get the view service

Constants

CSS_DEST_FOLDER

public mixed CSS_DEST_FOLDER = '@storage/runtime/scss/dest'

CSS_SRC_FOLDER

public mixed CSS_SRC_FOLDER = '@storage/runtime/scss/src'

Methods

clearCaches()

Clear all scss and css files

public clearCaches() : mixed
Return values
mixed

compileInlineFile()

Compile a scss file called in a template, identified by a hash then registers the css on the view

public compileInlineFile(string $path, string $hash, ThemeInterface $theme, string $template[, array<string|int, mixed> $options = [] ][, bool $force = false ]) : mixed
Parameters
$path : string
$hash : string
$theme : ThemeInterface
$template : string
$options : array<string|int, mixed> = []
$force : bool = false
Return values
mixed

compileInlineScss()

Compile some scss defined in a template, identified by a hash then registers the css on the view

public compileInlineScss(string $scss, string $hash, ThemeInterface $theme, string $template[, array<string|int, mixed> $options = [] ][, bool $force = false ]) : mixed
Parameters
$scss : string
$hash : string
$theme : ThemeInterface
$template : string
$options : array<string|int, mixed> = []
$force : bool = false
Return values
mixed

getDestFile()

Get a destination file path identified by a hash

protected getDestFile(string $hash) : string
Parameters
$hash : string
Return values
string

getSrcFile()

Get a source file path identified by a hash

protected getSrcFile(string $hash) : string
Parameters
$hash : string
Return values
string

matrixService()

Get the matrix service

protected matrixService() : MatrixService
Return values
MatrixService

registerInlineCssFile()

Register a css file on the view

protected registerInlineCssFile(string $cssFile) : mixed
Parameters
$cssFile : string
Return values
mixed

triggerEvent()

Triggers an event

protected triggerEvent(string $type, Event $event) : mixed
Parameters
$type : string
$event : Event
Return values
mixed

Search results