Documentation

ComponentHandler
in package

Handles all components, including legacy ones.

This is a wrapper class for SystemComponentRepository and LegacyComponentHandler

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Michael Ritter michael.ritter@comvation.com

subpackage

core_core

link

cloudrexx homepage

since
3.1.0

Table of Contents

Properties

$systemComponentRepo  : SystemComponentRepository
Repository of SystemComponents
$components  : array<string|int, mixed>
Available (and legal by license) components This list should be written in constructor (read from license). This does not work by now since license has different component names.
$frontend  : bool
Are we in frontend or backend mode?
$legacyComponentHandler  : LegacyContentHandler
Legacy code for old components

Methods

__construct()  : mixed
Instanciates a new ComponentHandler
callAdjustResponseHooks()  : mixed
Calls hook scripts to adjust response object (this is newer than legacy)
callPostComponentLoadHooks()  : mixed
Calls hook scripts on legacy and non-legacy components after they are loaded
callPostContentLoadHooks()  : mixed
Calls hook scripts on legacy and non-legacy components after loading content
callPostContentParseHooks()  : mixed
Calls hook scripts on legacy and non-legacy components after loading module content
callPostFinalizeHooks()  : mixed
Calls hook scripts on legacy and non-legacy components after finalizing
callPostInitHooks()  : mixed
Calls hook scripts on legacy and non-legay components after initialization
callPostResolveHooks()  : mixed
Calls hook scripts on legacy and non-legacy components after resolving
callPreContentLoadHooks()  : mixed
Calls hook scripts on legacy and non-legacy components before loading content
callPreContentParseHooks()  : mixed
Calls hook scripts on legacy and non-legacy components before loading module content
callPreFinalizeHooks()  : mixed
Calls hook scripts on legacy and non-legacy components before finalizing
callPreResolveHooks()  : mixed
Calls hook scripts on legacy and non-legacy components before resolving
callRegisterEventListenersHooks()  : mixed
Calls hook scripts on legacy and non-legacy components to register event listeners
callRegisterEventsHooks()  : mixed
Calls hook scripts on legacy and non-legacy components to register events
isLegacyComponent()  : bool
Wheter the component with the supplied name is a legacy one or not
loadComponent()  : null
Load the component with the name specified (legacy or not)
checkLegacy()  : bool
Checks for existance of legacy exception and executes it if available

Properties

$components

Available (and legal by license) components This list should be written in constructor (read from license). This does not work by now since license has different component names.

private array<string|int, mixed> $components = array('ComponentHandler')

$legacyComponentHandler

Legacy code for old components

private LegacyContentHandler $legacyComponentHandler

Methods

__construct()

Instanciates a new ComponentHandler

public __construct(License $license, bool $frontend, EntityManager $em, array<string|int, mixed> $preLoadedComponents) : mixed
Parameters
$license : License

Current license

$frontend : bool

Wheter we are in frontend mode or not

$em : EntityManager

Doctrine entity manager

$preLoadedComponents : array<string|int, mixed>

An array containing the preloaded components

Tags
todo

Read component list from license (see $this->components for why we didn't do that yet)

callAdjustResponseHooks()

Calls hook scripts to adjust response object (this is newer than legacy)

public callAdjustResponseHooks(Response $response) : mixed
Parameters
$response : Response

Current response

callPostComponentLoadHooks()

Calls hook scripts on legacy and non-legacy components after they are loaded

public callPostComponentLoadHooks() : mixed

callPostContentLoadHooks()

Calls hook scripts on legacy and non-legacy components after loading content

public callPostContentLoadHooks() : mixed

callPostContentParseHooks()

Calls hook scripts on legacy and non-legacy components after loading module content

public callPostContentParseHooks() : mixed

callPostFinalizeHooks()

Calls hook scripts on legacy and non-legacy components after finalizing

public callPostFinalizeHooks(string &$endcode) : mixed
Parameters
$endcode : string

The cx endcode passed by reference

callPostInitHooks()

Calls hook scripts on legacy and non-legay components after initialization

public callPostInitHooks() : mixed

callPostResolveHooks()

Calls hook scripts on legacy and non-legacy components after resolving

public callPostResolveHooks([string $mode = 'all' ]) : mixed
Parameters
$mode : string = 'all'

(optional) One of 'all', 'proper' and 'legacy', default is 'all'

callPreContentLoadHooks()

Calls hook scripts on legacy and non-legacy components before loading content

public callPreContentLoadHooks() : mixed

callPreContentParseHooks()

Calls hook scripts on legacy and non-legacy components before loading module content

public callPreContentParseHooks() : mixed

callPreFinalizeHooks()

Calls hook scripts on legacy and non-legacy components before finalizing

public callPreFinalizeHooks() : mixed

callPreResolveHooks()

Calls hook scripts on legacy and non-legacy components before resolving

public callPreResolveHooks([string $mode = 'all' ]) : mixed
Parameters
$mode : string = 'all'

(optional) One of 'all', 'proper' and 'legacy', default is 'all'

callRegisterEventListenersHooks()

Calls hook scripts on legacy and non-legacy components to register event listeners

public callRegisterEventListenersHooks([string $mode = 'all' ]) : mixed
Parameters
$mode : string = 'all'

(optional) One of 'all', 'proper' and 'legacy', default is 'all'

callRegisterEventsHooks()

Calls hook scripts on legacy and non-legacy components to register events

public callRegisterEventsHooks([string $mode = 'all' ]) : mixed
Parameters
$mode : string = 'all'

(optional) One of 'all', 'proper' and 'legacy', default is 'all'

isLegacyComponent()

Wheter the component with the supplied name is a legacy one or not

public isLegacyComponent(string $componentName) : bool
Parameters
$componentName : string

Name of the component to check

Return values
bool

True if it's a legacy component, false otherwise

loadComponent()

Load the component with the name specified (legacy or not)

public loadComponent(Cx $cx, string $componentName[, Page $page = null ]) : null
Parameters
$cx : Cx

Main class instance

$componentName : string

Name of component to load

$page : Page = null

Resolved page

Tags
throws
ComponentException

For legacy components without a load entry in LegacyClassLoader

Return values
null

checkLegacy()

Checks for existance of legacy exception and executes it if available

private checkLegacy(string $action, string $componentName) : bool
Parameters
$action : string

The action to be executed

$componentName : string

Name of the component to execute the action

Return values
bool

True if legacy has an exception for this action and component


        
On this page

Search results