Arikaim CMS

TemplatePackage extends Package
in package
implements PackageInterface, ViewComponentsInterface Uses ViewComponents, Themes, CssFiles, JsFiles, ComponentTranslations

Template package

Table of Contents

Interfaces

PackageInterface
Package interface, all packages type should impelement it.
ViewComponentsInterface
Package view components interface

Properties

$packageRegistry  : PackageRegistryInterface|null
Package Registry Interface
$path  : string
Package root path
$properties  : CollectionInterface
Package properties
$viewPath  : string|null
View path
$skipFiles  : array<string|int, mixed>
Skip component option files

Methods

__construct()  : mixed
Constructor
buildAssets()  : bool
Build css template files
disable()  : bool
Disable package
enable()  : bool
Enable package
getComponentLanguages()  : array<string|int, mixed>
Get component languages
getComponentPath()  : string
Get component path
getComponents()  : array<string|int, mixed>
Scan directory and return components list
getComponentsPath()  : string
Get components path
getComponentsRecursive()  : array<string|int, mixed>
Scan directory and return components list
getComponentTranslations()  : array<string|int, mixed>
Get package view components translations
getContentItems()  : array<string|int, mixed>
Get content items
getCssFiles()  : array<string|int, mixed>
Get package css files
getCssPath()  : string
Get package css path
getDefautTheme()  : string|null
Get default theme
getDrivers()  : array<string|int, mixed>
Get drivers classes list
getEmails()  : array<string|int, mixed>
Scan directory and return emails list
getEmailsPath()  : string
Get emails components path
getInstalOrder()  : mixed
Get install order
getJsFiles()  : array<string|int, mixed>
Get package js files
getJsPath()  : string
Get package js path
getLanguages()  : array<string|int, mixed>|null
Get suppported languages
getMacros()  : array<string|int, mixed>
Scan directory and return macros list
getMacrosPath()  : string
Get macros path
getName()  : string
Return package name
getPages()  : array<string|int, mixed>
Scan directory and return pages list
getPagesPath()  : string
Get pages path
getPath()  : string
Get package root path
getProperties()  : Collection
Get package properties
getProperty()  : mixed
Get package property
getRequire()  : CollectionInterface
Get require property
getRoutes()  : array<string|int, mixed>
Get template routes
getThemes()  : array<string|int, mixed>
Get themes
getTranslationFileName()  : string
Get translation file name
getTranslationRelativeFileName()  : string
Get translation relative file name path
getType()  : string|null
Get package type
getVersion()  : string
Get Package version
getViewPath()  : string
Get view path
hasLanguage()  : bool
Return true if component have language
install()  : mixed
Install template package
isInstalled()  : bool
Return true if package is installed
postInstall()  : bool
Run post install actions
readTranlationProperty()  : mixed
Get translation property value
readTranslation()  : array<string|int, mixed>|false
Read language translation
resolveTranslationFileName()  : string
Resolve translation file name
savePackageProperties()  : bool
Save package properties file
saveTranslation()  : bool
Save translation
setPrimary()  : bool
Set package as primary
setTranslationProperty()  : array<string|int, mixed>
Set translation property value
unInstall()  : bool
Uninstall package
validate()  : bool
Validate package properties
validator()  : PackageValidator
Create package validator

Properties

$path

Package root path

protected string $path

$skipFiles

Skip component option files

private array<string|int, mixed> $skipFiles = ['component.json', 'page.json']

Methods

buildAssets()

Build css template files

public buildAssets() : bool
Return values
bool

disable()

Disable package

public disable() : bool
Return values
bool

getComponentLanguages()

Get component languages

public getComponentLanguages(array<string|int, mixed> $componentFiles) : array<string|int, mixed>
Parameters
$componentFiles : array<string|int, mixed>
Return values
array<string|int, mixed>

getComponentPath()

Get component path

public getComponentPath(string|null $componentName[, string $type = 'components' ]) : string
Parameters
$componentName : string|null
$type : string = 'components'
Return values
string

getComponents()

Scan directory and return components list

public getComponents([string|null $parent = null ][, string $type = 'components' ]) : array<string|int, mixed>
Parameters
$parent : string|null = null
$type : string = 'components'
Return values
array<string|int, mixed>

getComponentsPath()

Get components path

public getComponentsPath() : string
Return values
string

getComponentsRecursive()

Scan directory and return components list

public getComponentsRecursive([string|null $path = null ]) : array<string|int, mixed>
Parameters
$path : string|null = null
Return values
array<string|int, mixed>

getComponentTranslations()

Get package view components translations

public getComponentTranslations(string $componentName[, string $type = 'components' ]) : array<string|int, mixed>
Parameters
$componentName : string
$type : string = 'components'
Return values
array<string|int, mixed>

getContentItems()

Get content items

public getContentItems() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCssFiles()

Get package css files

public getCssFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCssPath()

Get package css path

public getCssPath() : string
Return values
string

getDefautTheme()

Get default theme

public getDefautTheme() : string|null
Return values
string|null

getDrivers()

Get drivers classes list

public getDrivers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEmails()

Scan directory and return emails list

public getEmails([string|null $parent = null ]) : array<string|int, mixed>
Parameters
$parent : string|null = null
Return values
array<string|int, mixed>

getEmailsPath()

Get emails components path

public getEmailsPath() : string
Return values
string

getInstalOrder()

Get install order

public getInstalOrder([mixed|null $default = null ]) : mixed
Parameters
$default : mixed|null = null

getJsFiles()

Get package js files

public getJsFiles() : array<string|int, mixed>
Return values
array<string|int, mixed>

getJsPath()

Get package js path

public getJsPath() : string
Return values
string

getLanguages()

Get suppported languages

public getLanguages() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getMacros()

Scan directory and return macros list

public getMacros([string|null $path = null ]) : array<string|int, mixed>
Parameters
$path : string|null = null
Return values
array<string|int, mixed>

getMacrosPath()

Get macros path

public getMacrosPath() : string
Return values
string

getName()

Return package name

public getName() : string
Return values
string

getPages()

Scan directory and return pages list

public getPages([string|null $parent = null ]) : array<string|int, mixed>
Parameters
$parent : string|null = null
Return values
array<string|int, mixed>

getPagesPath()

Get pages path

public getPagesPath() : string
Return values
string

getPath()

Get package root path

public getPath() : string
Return values
string

getProperty()

Get package property

public getProperty(string $name[, mixed $default = null ]) : mixed
Parameters
$name : string
$default : mixed = null

getRoutes()

Get template routes

public getRoutes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getThemes()

Get themes

public getThemes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTranslationFileName()

Get translation file name

public getTranslationFileName(string $componentName, string $language[, string $type = 'components' ]) : string
Parameters
$componentName : string
$language : string
$type : string = 'components'
Return values
string

getTranslationRelativeFileName()

Get translation relative file name path

public getTranslationRelativeFileName(string $componentName, string $language[, string $type = 'components' ]) : string
Parameters
$componentName : string
$language : string
$type : string = 'components'
Return values
string

getType()

Get package type

public getType() : string|null
Return values
string|null

getVersion()

Get Package version

public getVersion() : string
Return values
string

getViewPath()

Get view path

public getViewPath([string|null $componentsType = null ]) : string
Parameters
$componentsType : string|null = null
Return values
string

hasLanguage()

Return true if component have language

public hasLanguage(array<string|int, mixed> $translations, string $language) : bool
Parameters
$translations : array<string|int, mixed>
$language : string
Return values
bool

install()

Install template package

public install([bool|null $primary = null ]) : mixed
Parameters
$primary : bool|null = null

Primary package replaces routes or other params

isInstalled()

Return true if package is installed

public isInstalled() : bool
Return values
bool

postInstall()

Run post install actions

public postInstall() : bool
Return values
bool

readTranlationProperty()

Get translation property value

public readTranlationProperty(array<string|int, mixed>|string $data, string $key[, string $separator = '_' ][, string|null $language = null ][, string $type = 'components' ]) : mixed
Parameters
$data : array<string|int, mixed>|string
$key : string
$separator : string = '_'
$language : string|null = null
$type : string = 'components'

readTranslation()

Read language translation

public readTranslation(string $componentName, string $language[, string $type = 'components' ]) : array<string|int, mixed>|false
Parameters
$componentName : string
$language : string
$type : string = 'components'
Return values
array<string|int, mixed>|false

resolveTranslationFileName()

Resolve translation file name

public resolveTranslationFileName(string $path, string $language) : string
Parameters
$path : string
$language : string
Return values
string

savePackageProperties()

Save package properties file

public savePackageProperties() : bool
Return values
bool

saveTranslation()

Save translation

public saveTranslation(array<string|int, mixed> $data, string $componentName, string $language[, string $type = 'components' ]) : bool
Parameters
$data : array<string|int, mixed>
$componentName : string
$language : string
$type : string = 'components'
Return values
bool

setPrimary()

Set package as primary

public setPrimary() : bool
Return values
bool

setTranslationProperty()

Set translation property value

public setTranslationProperty(array<string|int, mixed> $data, string $key, mixed $value[, string $separator = '_' ]) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
$key : string
$value : mixed
$separator : string = '_'
Return values
array<string|int, mixed>

unInstall()

Uninstall package

public unInstall() : bool
Return values
bool

validate()

Validate package properties

public validate() : bool
Return values
bool

        
On this page

Search results