Documentation

ThemeRepository
in package

ThemeRepository

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Ueli Kramer ueli.kramer@comvation.com

author

Project Team SS4U info@cloudrexx.com

subpackage

core_view

Table of Contents

Properties

$loadedThemes  : array<string|int, mixed>
$arrParentXmlElement  : mixed
$currentXmlElement  : mixed
$db  : ADOConnection
$xmlDocument  : mixed

Methods

__construct()  : mixed
convertAllThemesToComponent()  : mixed
Generate a component.yml for each theme available on the system only used in update process for fixing invalid themes
convertThemeToComponent()  : mixed
Generate a component.yml for one theme available on the system
findAll()  : array<string|int, mixed>
Get all themes as objects with a provided order and by language id
findBy()  : array<string|int, mixed>
Get multiple themes
findById()  : Theme
Get a theme by theme id
findOneBy()  : Theme
Find one theme by provided criterias and sort them in a defined order
getActiveThemes()  : mixed
Get themes active themes
getDefaultTheme()  : Theme
Get the default theme by device type and language
getThemesBySubType()  : array<string|int, mixed>
get themes by its subtype
loadComponentData()  : mixed
Load the component data from component.yml file
remove()  : bool
Removes a theme from database
saveComponentData()  : mixed
Writes the component.yml file with the data defined in component data array
getTheme()  : Theme
Get a theme object with all his attributes
xmlCharacterDataTag()  : mixed
XML parser character data tag
xmlEndTag()  : mixed
XML parser end tag
xmlParseFile()  : mixed
get XML info of specified modulefolder
xmlStartTag()  : mixed
XML parser start tag

Properties

$loadedThemes

protected static array<string|int, mixed> $loadedThemes = array()

ID=>\Cx\Core\View\Model\Entity\Theme

Methods

convertAllThemesToComponent()

Generate a component.yml for each theme available on the system only used in update process for fixing invalid themes

public convertAllThemesToComponent() : mixed

convertThemeToComponent()

Generate a component.yml for one theme available on the system

public convertThemeToComponent(Theme $theme) : mixed
Parameters
$theme : Theme

findAll()

Get all themes as objects with a provided order and by language id

public findAll([array<string|int, mixed> $order = array() ][, int $languageId = null ]) : array<string|int, mixed>
Parameters
$order : array<string|int, mixed> = array()

the order, e.g. array( 'field' => 'ASC|DESC' )

$languageId : int = null

language id

Return values
array<string|int, mixed>

theme objects

findBy()

Get multiple themes

public findBy([array<string|int, mixed> $crit = array() ][, array<string|int, mixed> $order = array() ][, int $languageId = null ]) : array<string|int, mixed>
Parameters
$crit : array<string|int, mixed> = array()

the criterias

$order : array<string|int, mixed> = array()

the order, e.g. array( 'field' => 'ASC|DESC' )

$languageId : int = null

filter by language id

Return values
array<string|int, mixed>

theme objects

findById()

Get a theme by theme id

public findById(int $id) : Theme
Parameters
$id : int

the id of the theme

Return values
Theme

the theme

findOneBy()

Find one theme by provided criterias and sort them in a defined order

public findOneBy([array<string|int, mixed> $crit = array() ][, array<string|int, mixed> $order = array() ]) : Theme
Parameters
$crit : array<string|int, mixed> = array()

the criterias

$order : array<string|int, mixed> = array()

the order, e.g. array( 'field' => 'ASC|DESC' )

Return values
Theme

the theme object

getDefaultTheme()

Get the default theme by device type and language

public getDefaultTheme([string $type = CxCoreViewModelEntityTheme::THEME_TYPE_WEB ][, int $languageId = null ]) : Theme
Parameters
$type : string = CxCoreViewModelEntityTheme::THEME_TYPE_WEB

the type of output device

$languageId : int = null

the language id

Return values
Theme

the default theme

getThemesBySubType()

get themes by its subtype

public getThemesBySubType([string $type = CxCoreViewModelEntityTheme::THEME_TYPE_WEB ]) : array<string|int, mixed>
Parameters
$type : string = CxCoreViewModelEntityTheme::THEME_TYPE_WEB

the sub type of the theme

Return values
array<string|int, mixed>

array of themes filtered by the sub type

loadComponentData()

Load the component data from component.yml file

public loadComponentData(Theme &$theme) : mixed
Parameters
$theme : Theme

remove()

Removes a theme from database

public remove(Theme $theme) : bool
Parameters
$theme : Theme

a theme object

Return values
bool

true if the query has been successfully completed

saveComponentData()

Writes the component.yml file with the data defined in component data array

public saveComponentData(Theme $theme) : mixed
Parameters
$theme : Theme

the theme object

getTheme()

Get a theme object with all his attributes

protected getTheme(int $id, string $themesname, string $foldername, int $expert[, int $languageId = null ]) : Theme

Loads the component data from component.yml file or creates one from info.xml or a new one from static array

Parameters
$id : int

the id of a theme, used for delete

$themesname : string

the display name of theme

$foldername : string

the physical folder name

$expert : int
$languageId : int = null

language id

Return values
Theme

a theme object

xmlCharacterDataTag()

XML parser character data tag

protected xmlCharacterDataTag(resource $parser, string $cData) : mixed
Parameters
$parser : resource
$cData : string

xmlEndTag()

XML parser end tag

protected xmlEndTag(resource $parser, string $name) : mixed
Parameters
$parser : resource
$name : string

xmlParseFile()

get XML info of specified modulefolder

protected xmlParseFile(mixed $file) : mixed
Parameters
$file : mixed

xmlStartTag()

XML parser start tag

protected xmlStartTag(resource $parser, string $name, array<string|int, mixed> $attrs) : mixed
Parameters
$parser : resource
$name : string
$attrs : array<string|int, mixed>

        
On this page

Search results