Arikaim CMS

ComponentInterface

View component interface

Table of Contents

Constants

ARIKAIM_COMPONENT_TYPE  = 'arikaim'
COMPONENTS_LIBRARY  = 4
EMAIL_COMPONENT_TYPE  = 'email'
EMPTY_COMPONENT_TYPE  = 'empty'
EXTENSION_COMPONENT  = 2
HTML_COMPONENT_TYPE  = 'html'
JS_COMPONENT_TYPE  = 'js'
JSON_COMPONENT_TYPE  = 'json'
PAGE_COMPONENT_TYPE  = 'page'
PRIMARY_TEMLATE  = 3
REACT_COMPONENT_TYPE  = 'react'
RENDER_MODE_EDIT  = 1
RENDER_MODE_VIEW  = 0
STATIC_COMPONENT_TYPE  = 'static'
SVG_COMPONENT_TYPE  = 'svg'
TEMPLATE_COMPONENT  = 1
UNKNOWN_COMPONENT  = 0
VUE_COMPONENT_TYPE  = 'vue'
WIWGET_COMPONENT_TYPE  = 'widget'

Methods

addFile()  : void
Add file
addIncludedComponent()  : void
Add included component
clearContent()  : void
Clear content
getBasePath()  : string
Return base path
getComponentFile()  : string|false
Get component file
getComponentType()  : string
Get component type
getContext()  : array<string|int, mixed>
Get context
getError()  : string|null
Get error
getFiles()  : array<string|int, mixed>
Return component files
getFullName()  : string
Get component full name
getFullPath()  : string
Get full path
getHtmlCode()  : string
Get component html code
getIncludedComponents()  : array<string|int, mixed>
Get included components
getIncludeFile()  : string|null
Get include file url
getLanguage()  : string
Get language code
getLocation()  : int
Get component location
getName()  : string
Get name
getOptions()  : array<string|int, mixed>
Get options
getTemplateFile()  : string|false
Get template file
getTemplateName()  : string|null
Get template or extension name
getTemplateUrl()  : string
Get template url
hasContent()  : bool
Return true if component is not empty
hasError()  : bool
Return true if component have error
isValid()  : bool
Check if component is valid
setComponentType()  : void
Set component type
setContext()  : void
Set context
setError()  : void
Set error
setHtmlCode()  : void
Set html code
setPrimaryTemplate()  : void
Set primary template name
toArray()  : array<string|int, mixed>
Convert to array
url()  : string
Get url

Constants

Methods

addFile()

Add file

public addFile(array<string|int, mixed> $file, string $fileType) : void
Parameters
$file : array<string|int, mixed>
$fileType : string

addIncludedComponent()

Add included component

public addIncludedComponent(string $name, string $type[, string|null $id = null ]) : void
Parameters
$name : string
$type : string
$id : string|null = null

getBasePath()

Return base path

public getBasePath() : string
Return values
string

getComponentFile()

Get component file

public getComponentFile(string $fileExt) : string|false
Parameters
$fileExt : string
Return values
string|false

getComponentType()

Get component type

public getComponentType() : string
Return values
string

getContext()

Get context

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

getFiles()

Return component files

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

getFullName()

Get component full name

public getFullName() : string
Return values
string

getHtmlCode()

Get component html code

public getHtmlCode() : string
Return values
string

getIncludedComponents()

Get included components

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

getIncludeFile()

Get include file url

public getIncludeFile(string $fileType) : string|null
Parameters
$fileType : string
Return values
string|null

getLanguage()

Get language code

public getLanguage() : string
Return values
string

getLocation()

Get component location

public getLocation() : int
Return values
int

getOptions()

Get options

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

getTemplateFile()

Get template file

public getTemplateFile() : string|false
Return values
string|false

getTemplateName()

Get template or extension name

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

getTemplateUrl()

Get template url

public getTemplateUrl() : string
Return values
string

hasContent()

Return true if component is not empty

public hasContent() : bool
Return values
bool

hasError()

Return true if component have error

public hasError() : bool
Return values
bool

isValid()

Check if component is valid

public isValid() : bool
Return values
bool

setComponentType()

Set component type

public setComponentType(string $type) : void
Parameters
$type : string

setContext()

Set context

public setContext(array<string|int, mixed> $context) : void
Parameters
$context : array<string|int, mixed>

setError()

Set error

public setError(string $code) : void
Parameters
$code : string

setHtmlCode()

Set html code

public setHtmlCode(string $code) : void
Parameters
$code : string

setPrimaryTemplate()

Set primary template name

public setPrimaryTemplate(string $name) : void
Parameters
$name : string

toArray()

Convert to array

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

        
On this page

Search results