Documentation

Core_Page extends Core_Servant_Properties
in package

Frontend data, e.g. title, description, template and data hierarchy

Доступные методы:

  • fileTimestamp(TRUE|FALSE) использовать в качестве временной метки дату файла, а не дату изменения макета, по умолчанию FALSE.
  • compress(TRUE|FALSE) использовать компрессию, по умолчанию TRUE. Требует модуль "Компрессия страниц".
  • doctype('html'|'xhtml') используемый DOCTYPE, влияет на формирование мета-тегов.
// Get Title $title = Core_Page::instance()->title; // Set Title Core_Page::instance()->title('New title'); // Get description $description = Core_Page::instance()->description; // Set description Core_Page::instance()->description('New description'); // Get keywords $keywords = Core_Page::instance()->keywords; // Set keywords Core_Page::instance()->keywords('New keywords'); // Get Template object $oTemplate = Core_Page::instance()->template; var_dump($oTemplate->id); // Get Structure object $oStructure = Core_Page::instance()->structure; var_dump($oStructure->id); // Get Core_Response object $oCore_Response = Core_Page::instance()->response; // Set HTTP status $oCore_Response->status(404); // Get array of lib params $array = Core_Page::instance()->libParams; // Get controller object $object = Core_Page::instance()->object;

if (is_object(Core_Page::instance()->object) && get_class(Core_Page::instance()->object) == 'Informationsystem_Controller_Show') { $Informationsystem_Controller_Show = Core_Page::instance()->object; }

Tags
subpackage

Core

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$css  : array<string|int, mixed>
Linking css
$instance  : mixed
The singleton instances.
$js  : array<string|int, mixed>
Linking js
$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_children  : array<string|int, mixed>
Children entities
$_currentObject  : mixed
Current executing object
$_frontendExecutionTimes  : array<string|int, mixed>
frontendExecutionTimes
$_propertiesValues  : array<string|int, mixed>
Properties values
$_unlimitedProperties  : bool
Object has unlimited number of properties

Methods

__construct()  : mixed
Constructor.
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
addChild()  : self
Add child to an hierarchy
addFrontendExecutionTimes()  : self
Add Frontend Execution Time
addFrontentExecutionTimes()  : mixed
Fix name bug
addTemplates()  : self
Add templates
clearCss()  : self
Clear $css list
clearJs()  : self
Clear $js list
css()  : self
Link $css onto the end of array
deleteChild()  : self
Delete first child
error403()  : self
Show 403 error
error404()  : self
Show 404 error
execute()  : mixed
Executes the business logic.
getChildren()  : array<string|int, mixed>
Get children
getCss()  : string
Get block of linked css and clear added CSS list
getCurrentObject()  : mixed
Get current executing object
getFrontendExecutionTimes()  : array<string|int, mixed>
Get array of Frontend Execution Time
getJs()  : string
Get block of linked JS and clear added JS list
instance()  : object
Register an existing instance as a singleton.
js()  : self
Link js
prepareByStructure()  : self
Prepare Core_Page by Structure
prependCss()  : self
Link $css to the beginning of list
prependJs()  : self
Link $js to the beginning of list
set()  : self
Run when writing data to inaccessible properties
setUnlimitedProperties()  : self
Set unlimitedProperties
showCss()  : self
Show block of linked css and clear added CSS list
showDescription()  : self
Show page description
showJs()  : self
Show block of linked JS and clear added JS list
showKeywords()  : self
Show page keywords
showTitle()  : self
Show page title
_getCss()  : string
Get block of linked css
_getCssCompressed()  : string
Get block of linked compressed css
_getJs()  : string
Get block of linked js
_getJsCompressed()  : string
Get block of linked compressed js
_getMode()  : string
Get JS mode

Properties

$css

Linking css

public array<string|int, mixed> $css = array()

$instance

The singleton instances.

public static mixed $instance = \NULL

$js

Linking js

public array<string|int, mixed> $js = array()

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array('doctype', 'title', 'description', 'keywords', 'template', 'structure', 'response', 'libParams', 'widgetParams', 'object', 'buildingPage', 'fileTimestamp', 'compress', 'cssCDN', 'jsCDN', 'informationsystemCDN', 'shopCDN', 'structureCDN')

$_children

Children entities

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

$_currentObject

Current executing object

protected mixed $_currentObject = \NULL

$_frontendExecutionTimes

frontendExecutionTimes

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

$_propertiesValues

Properties values

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

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

Methods

__construct()

Constructor.

public __construct() : mixed

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

addChild()

Add child to an hierarchy

public addChild(object $object) : self
Parameters
$object : object

object

Return values
self

addFrontendExecutionTimes()

Add Frontend Execution Time

public addFrontendExecutionTimes(mixed $value) : self
Parameters
$value : mixed
Return values
self

addFrontentExecutionTimes()

Fix name bug

public addFrontentExecutionTimes(mixed $value) : mixed
Parameters
$value : mixed

clearCss()

Clear $css list

public clearCss() : self
Return values
self

clearJs()

Clear $js list

public clearJs() : self
Return values
self

css()

Link $css onto the end of array

public css(string $css) : self
Parameters
$css : string

path

Return values
self

deleteChild()

Delete first child

public deleteChild() : self
Return values
self

error403()

Show 403 error

public error403() : self
Tags
hostcms-event

Core_Page.onBeforeError403

Return values
self

error404()

Show 404 error

public error404() : self
Tags
hostcms-event

Core_Page.onBeforeError404

Return values
self

execute()

Executes the business logic.

public execute() : mixed

getChildren()

Get children

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

getCss()

Get block of linked css and clear added CSS list

public getCss([bool $bExternal = TRUE ]) : string
Parameters
$bExternal : bool = TRUE

add as link

Tags
hostcms-event

Core_Page.onBeforeGetCss

Return values
string

getCurrentObject()

Get current executing object

public getCurrentObject() : mixed

getFrontendExecutionTimes()

Get array of Frontend Execution Time

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

getJs()

Get block of linked JS and clear added JS list

public getJs([bool $mode = FALSE ]) : string
Parameters
$mode : bool = FALSE

async|defer|TRUE|FALSE, default FALSE

Tags
hostcms-event

Core_Page.onBeforeGetJs

Return values
string

instance()

Register an existing instance as a singleton.

public static instance() : object
Return values
object

js()

Link js

public js(string $js[, bool $mode = FALSE ]) : self
Parameters
$js : string

path

$mode : bool = FALSE

async|defer|TRUE|FALSE, default FALSE

Return values
self

prepareByStructure()

Prepare Core_Page by Structure

public prepareByStructure(Structure_Model $oStructure) : self
Parameters
$oStructure : Structure_Model
Return values
self

prependCss()

Link $css to the beginning of list

public prependCss(string $css) : self
Parameters
$css : string

path

Return values
self

prependJs()

Link $js to the beginning of list

public prependJs(string $js[, bool $mode = FALSE ]) : self
Parameters
$js : string

path

$mode : bool = FALSE

async|defer|TRUE|FALSE, default FALSE

Return values
self

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

showCss()

Show block of linked css and clear added CSS list

public showCss([bool $bExternal = TRUE ]) : self
Parameters
$bExternal : bool = TRUE

add as link

Tags
hostcms-event

Core_Page.onBeforeShowCss

Return values
self

showDescription()

Show page description

public showDescription() : self
Return values
self

showJs()

Show block of linked JS and clear added JS list

public showJs([bool $mode = FALSE ]) : self
Parameters
$mode : bool = FALSE

async|defer|TRUE|FALSE, default FALSE

Tags
hostcms-event

Core_Page.onBeforeShowJs

Return values
self

showKeywords()

Show page keywords

public showKeywords() : self
Return values
self

showTitle()

Show page title

public showTitle() : self
Return values
self

_getCss()

Get block of linked css

protected _getCss([bool $bExternal = TRUE ]) : string
Parameters
$bExternal : bool = TRUE

add as link, default TRUE

Return values
string

_getCssCompressed()

Get block of linked compressed css

protected _getCssCompressed([bool $bExternal = TRUE ]) : string
Parameters
$bExternal : bool = TRUE

add as link, default TRUE

Return values
string

_getJs()

Get block of linked js

protected _getJs([bool $mode = FALSE ]) : string
Parameters
$mode : bool = FALSE

async|defer|TRUE|FALSE, default FALSE

Return values
string

_getJsCompressed()

Get block of linked compressed js

protected _getJsCompressed([bool $mode = FALSE ]) : string
Parameters
$mode : bool = FALSE

async|defer|TRUE|FALSE, default FALSE

Return values
string

_getMode()

Get JS mode

protected _getMode( $mode) : string
Parameters
$mode :
Return values
string

        
On this page

Search results