Page
class Page extends BaseComponent implements HtmlPageInterface
Html page
Traits
Constants
SYSTEM_TEMPLATE_NAME |
Control panel template name |
PAGE_NOT_FOUND |
Error page names |
SYSTEM_ERROR_PAGE |
|
APPLICATION_ERROR_PAGE |
|
Properties
protected string | $name | Component name | from BaseComponent |
protected string | $fullName | Component full name | from BaseComponent |
protected string | $templateName | Template, extension or components library name | from BaseComponent |
protected string | $templateUrl | Template url | from BaseComponent |
protected string | $path | Component path | from BaseComponent |
protected integer | $location | Component Location | from BaseComponent |
protected string | $fullPath | Component full path | from BaseComponent |
protected string | $filePath | File path | from BaseComponent |
protected string | $language | Language code | from BaseComponent |
protected string | $htmlCode | Html code | from BaseComponent |
protected string|null | $error | Component error code | from BaseComponent |
protected string | $basePath | Base path | from BaseComponent |
protected array | $files | Component files | from BaseComponent |
protected string | $viewPath | View path | from BaseComponent |
protected string | $extensionsPath | Extensions path | from BaseComponent |
protected string | $primaryTemplate | Primary template name | from BaseComponent |
protected string | $componentType | Component type | from BaseComponent |
protected array | $context | Component context used in render | from BaseComponent |
protected | $hasHtmlContent | Return true if compoent has html file | from BaseComponent |
protected string|null | $htmlFileName | Html file name | from BaseComponent |
protected string | $url | Component url | from BaseComponent |
protected array | $includedComponents | Included compoents | from BaseComponent |
protected array | $options | Options | from BaseComponent |
protected boolean | $removeIncludeOptions | Remove include options | from Options |
protected string | $optionsFile | Optins file | from Options |
protected array | $properties | Properies | from Properties |
protected PageHead | $head | Page head properties | |
protected array | $libraryOptions | Ui Library options | |
protected string | $currentTenplate | Current template name | |
protected array | $componentsFiles | Component include files (js) | |
protected ViewInterface | $view | View |
Methods
Init component
Render component data
Return true if component is valid
Get component full path
Return library properties
Get library files
Render html component
Set current template name
Get head properties
Render page
Get page includes
Resolve page head
Get components include files
Get current template name
Return url link with current language code
Get full page url
Set current language
Get page include files
Get template include files
Resolve include files
Get include library files
Render page not found
Render application error
Render system error(s)
Details
at line 103
__construct(ViewInterface $view, string $defaultLanguage, array $libraryOptions = [])
Constructor
at line 143
void
init()
Init component
in BaseComponent at line 237
array
getOptions()
Get options
at line 213
bool
resolve(array $params = [])
Render component data
at line 133
bool
isValid()
Return true if component is valid
in BaseComponent at line 270
void
addIncludedComponent(string $name, string $type)
Add included component
in BaseComponent at line 286
array
getIncludedComponents()
Get included components
in BaseComponent at line 298
mixed
create(string $name, string $language)
Create component
in BaseComponent at line 315
array
getContext()
Get context
in BaseComponent at line 326
void
setContext(array $context)
Set context
in BaseComponent at line 337
void
mergeContext(array $data)
Merge context
in BaseComponent at line 348
void
mergeRecursiveContext(array $data)
Merge recursive context
in BaseComponent at line 359
string|null
getIncludeFile(string $fileType)
Get include file url
in BaseComponent at line 372
void
setPrimaryTemplate(string $name)
Set primary template name
in BaseComponent at line 382
string
getPrimaryTemplate()
Get primary template
in BaseComponent at line 392
bool
hasParent()
Return true if component has child
in BaseComponent at line 407
string
getBasePath()
Return base path
in BaseComponent at line 417
string
getName()
Get component name
in BaseComponent at line 427
string|null
getFullName()
Get component full name
in BaseComponent at line 438
string|null
getTemplateFile()
Get template file
in BaseComponent at line 448
bool
hasError()
Return true if have error
in BaseComponent at line 458
bool
hasContent()
Return true if component have html content
in BaseComponent at line 468
protected void
resolveHtmlContent()
Resolev html content
in BaseComponent at line 479
bool
hasFiles(string|null $fileType = null)
Return true if component have files
in BaseComponent at line 498
array
getFiles(string|null $fileType = null)
Return files
in BaseComponent at line 508
string|null
getPath()
Get path
in BaseComponent at line 518
string
getFullPath()
Get full path
in BaseComponent at line 528
string
getComponentType()
Get component type
in BaseComponent at line 539
void
setComponentType(string $type)
Set component type
in BaseComponent at line 549
int
getLocation()
Get location
in BaseComponent at line 559
string|null
getTemplateName()
Get template or extension name
in BaseComponent at line 569
string
getLanguage()
Get language
in BaseComponent at line 579
string|null
getError()
Get error
in BaseComponent at line 589
string
getHtmlCode()
Get html code
in BaseComponent at line 600
void
setHtmlCode(string $code)
Set html code
in BaseComponent at line 611
void
setError(string $code)
Set error
in BaseComponent at line 621
void
clearContent()
Clear content
in BaseComponent at line 636
mixed
addComponentFile(string $fileExt)
Add component file
in BaseComponent at line 662
void
addFile(array $file, string $fileType)
Add file
in BaseComponent at line 675
protected void
parseName(string $name)
Parse component name
in BaseComponent at line 733
array
toArray()
Convert to array
in BaseComponent at line 743
string
url()
Get url
in BaseComponent at line 754
string
getRootPath(bool $relative = false)
Get root componetn path
in BaseComponent at line 771
string
getTemplatePath(string $template, int $location)
Get template path
in BaseComponent at line 791
string|false
getComponentFile(string $fileExt)
Get component file
in BaseComponent at line 804
string
getFileUrl(string $fileName)
Convert file path to url
in BaseComponent at line 815
string
getComponentFullPath(int $location, string $templateName)
Get component full path
in BaseComponent at line 828
protected void
resolvePath()
Resolve component path
in BaseComponent at line 864
string
getTemplateUrl()
Get template url
in Options at line 36
protected void
componentTypeOption()
Component type option
in Options at line 51
void
setOptionFile(string $name)
Set option file name
in Options at line 63
mixed
getOption(string $key, mixed $default = null)
Get option
in Options at line 75
void
setOption(string $key, mixed $value)
Set option value
in Options at line 85
void
loadOptions()
Load options json file
in Options at line 109
protected string|null
getOptionsFileName()
Get options file name
in Options at line 120
protected void
setOptionsFileName(string $fileName)
Set options file name
in Options at line 131
protected void
resolveOptionsFileName(string|null $path = null)
Resolve options file name
in Properties at line 50
void
loadProperties()
Load properties json file
in Properties at line 68
void
mergeProperties()
Add properties to context array
in Properties at line 78
bool
hasProperties()
Return true if component have properties
in Properties at line 92
array
getProperties()
Get properties
in Properties at line 102
string|null
getPropertiesFileName()
Get properties file name
in Properties at line 113
void
setPropertiesFileName(string $fileName)
Set properties file name
in IndexPage at line 24
string
getIndexFile(string $currentTemlate)
Get page index file
in UiLibrary at line 30
Collection
getLibraryProperties(string $name, string|null $version = null)
Return library properties
in UiLibrary at line 54
array
parseLibraryName(string $libraryName)
Parse library name (name:version)
in UiLibrary at line 71
array
getLibraryDetails(string $libraryName)
Get library details
in UiLibrary at line 104
array
getLibraryFiles(string $libraryName, string|null $version, string|null $option = null)
Get library files
in UiLibrary at line 145
array
resolveLibraryParams(Collection $properties)
Resolve library params
in IncludeOption at line 24
protected void
processIncludeOption()
Process component include js files option
in IncludeOption at line 48
protected array|null
resolveIncludeFile(string $includeFile)
Resolve include file
at line 165
HtmlComponentInterface;
renderHtmlComponent(string $name, array $params = [], string|null $language = null, string|null $type = null)
Render html component
at line 192
void
setCurrentTemplate(string $name)
Set current template name
at line 202
PageHead
head()
Get head properties
at line 233
ComponentInterface
render(string $name, array $params = [], string|null $language = null)
Render page
at line 285
protected array
getPageIncludes(string $name, string $language)
Get page includes
at line 323
protected void
resolvePageHead(array $head, string $templateUrl)
Resolve page head
at line 351
void
setHead(Collection $head)
Set page head properties
at line 361
array
getComponentsFiles()
Get components include files
at line 371
string|null
getCurrentTemplate()
Get current template name
at line 384
static string
getUrl(string|null $path = '', bool $full = false, string|null $language = null)
Return url link with current language code
at line 398
static string
getFullUrl(string $path, string|null $language = null)
Get full page url
at line 409
void
setLanguage(string $language)
Set current language
at line 419
array
getPageIncludeFiles()
Get page include files
at line 457
array
getTemplateIncludeFiles(string $templateName)
Get template include files
at line 485
protected array
resolveIncludeFiles(array $include, string $url)
Resolve include files
at line 535
array
getLibraryIncludeFiles(array $libraryList, string $templateName)
Get include library files
at line 573
ComponentInterface
renderPageNotFound(array $data = [], string|null $language = null, string|null $templateName = null)
Render page not found
at line 590
ComponentInterface
renderApplicationError(array $data = [], string|null $language = null, string|null $templateName = null)
Render application error
at line 607
ComponentInterface
renderSystemError(array $error = [], string|null $language = null, string|null $templateName = null)
Render system error(s)