SystemComponentRepository
extends EntityRepository
in package
Repository for SystemComponents
This decorates SystemComponents with SystemComponentController class
Tags
Table of Contents
Properties
- $cx : Cx
- Main class instance
- $loadedComponents : array<string|int, mixed>
- List of loaded (and decorated) components
Methods
- __construct() : mixed
- Initialize repository
- callAdjustResponseHooks() : mixed
- Call hook script of current SystemComponent after post-resolving
- callPostComponentLoadHooks() : mixed
- Call hook script of all SystemComponents after they are loaded
- callPostContentLoadHooks() : mixed
- Call hook script of all SystemComponents after loading content
- callPostContentParseHooks() : mixed
- Call hook script of all SystemComponents after loading module content
- callPostFinalizeHooks() : mixed
- Call hook script of all SystemComponents after finalization
- callPostInitHooks() : mixed
- Call hook script of all SystemComponents after initalization
- callPostResolveHooks() : mixed
- Call hook script of all SystemComponents after resolving
- callPreContentLoadHooks() : mixed
- Call hook script of all SystemComponents before loading content
- callPreContentParseHooks() : mixed
- Call hook script of all SystemComponents before loading module content
- callPreFinalizeHooks() : mixed
- Call hook script of all SystemComponents before finalization
- callPreResolveHooks() : mixed
- Call hook script of all SystemComponents before resolving
- callRegisterEventListenersHooks() : mixed
- Call hook script of all SystemComponents to register event listeners
- callRegisterEventsHooks() : mixed
- Call hook script of all SystemComponents to register events
- find() : SystemComponentController
- Finds an entity by its primary key / identifier.
- findActive() : array<string|int, mixed>
- Finds all active entities in the repository.
- findAll() : array<string|int, mixed>
- Finds all entities in the repository.
- findBy() : array<string|int, mixed>
- Finds entities by a set of criteria.
- findOneBy() : SystemComponentController
- Finds a single entity by a set of criteria.
- loadComponent() : mixed
- Load a component (tell it to parse its content)
- setPreLoadedComponents() : mixed
- Loads the systemComponent using the doctrine entity manager for the existing SystemComponentController and adds it to the repository
- callHook() : mixed
- Calls a hook on a component
- callHooks() : mixed
- Calls a hook on all components
- decorate() : mixed
- Decorates an entity or an array of entities
- decorateEntity() : SystemComponentController
- Decorates a single entity
- getComponentControllerClassFor() : string
- Returns class name to use for decoration
Properties
$cx
Main class instance
protected
Cx
$cx
= null
$loadedComponents
List of loaded (and decorated) components
protected
array<string|int, mixed>
$loadedComponents
= array()
Methods
__construct()
Initialize repository
public
__construct(EntityManager $em, ClassMetadata $class) : mixed
Parameters
- $em : EntityManager
-
Doctrine entity manager
- $class : ClassMetadata
-
Metadata of entity class handled by this repository
callAdjustResponseHooks()
Call hook script of current SystemComponent after post-resolving
public
callAdjustResponseHooks(Response $response) : mixed
Parameters
- $response : Response
-
Current response
Tags
callPostComponentLoadHooks()
Call hook script of all SystemComponents after they are loaded
public
callPostComponentLoadHooks() : mixed
callPostContentLoadHooks()
Call hook script of all SystemComponents after loading content
public
callPostContentLoadHooks() : mixed
callPostContentParseHooks()
Call hook script of all SystemComponents after loading module content
public
callPostContentParseHooks() : mixed
callPostFinalizeHooks()
Call hook script of all SystemComponents after finalization
public
callPostFinalizeHooks(mixed &$endcode) : mixed
Parameters
- $endcode : mixed
callPostInitHooks()
Call hook script of all SystemComponents after initalization
public
callPostInitHooks() : mixed
callPostResolveHooks()
Call hook script of all SystemComponents after resolving
public
callPostResolveHooks() : mixed
callPreContentLoadHooks()
Call hook script of all SystemComponents before loading content
public
callPreContentLoadHooks() : mixed
callPreContentParseHooks()
Call hook script of all SystemComponents before loading module content
public
callPreContentParseHooks() : mixed
callPreFinalizeHooks()
Call hook script of all SystemComponents before finalization
public
callPreFinalizeHooks() : mixed
callPreResolveHooks()
Call hook script of all SystemComponents before resolving
public
callPreResolveHooks() : mixed
callRegisterEventListenersHooks()
Call hook script of all SystemComponents to register event listeners
public
callRegisterEventListenersHooks() : mixed
callRegisterEventsHooks()
Call hook script of all SystemComponents to register events
public
callRegisterEventsHooks() : mixed
find()
Finds an entity by its primary key / identifier.
public
find(int $id[, int $lockMode = LockMode::NONE ][, int $lockVersion = null ]) : SystemComponentController
Overwritten in order to decorate result
Parameters
- $id : int
-
The identifier.
- $lockMode : int = LockMode::NONE
- $lockVersion : int = null
Return values
SystemComponentController —The entity.
findActive()
Finds all active entities in the repository.
public
findActive() : array<string|int, mixed>
Return values
array<string|int, mixed> —The active entities.
findAll()
Finds all entities in the repository.
public
findAll() : array<string|int, mixed>
Overwritten in order to decorate result
Return values
array<string|int, mixed> —The entities.
findBy()
Finds entities by a set of criteria.
public
findBy(array<string|int, mixed> $criteria[, array<string|int, mixed>|null $orderBy = null ][, int|null $limit = null ][, int|null $offset = null ]) : array<string|int, mixed>
Overwritten in order to decorate result
Parameters
- $criteria : array<string|int, mixed>
- $orderBy : array<string|int, mixed>|null = null
- $limit : int|null = null
- $offset : int|null = null
Return values
array<string|int, mixed>findOneBy()
Finds a single entity by a set of criteria.
public
findOneBy(array<string|int, mixed> $criteria[, array<string|int, mixed>|null $orderBy = null ]) : SystemComponentController
Overwritten in order to decorate result
Parameters
- $criteria : array<string|int, mixed>
- $orderBy : array<string|int, mixed>|null = null
Return values
SystemComponentController —The entity.
loadComponent()
Load a component (tell it to parse its content)
public
loadComponent(string $componentName) : mixed
Parameters
- $componentName : string
-
Name of component to load
setPreLoadedComponents()
Loads the systemComponent using the doctrine entity manager for the existing SystemComponentController and adds it to the repository
public
setPreLoadedComponents(array<string|int, mixed> $preLoadedComponents) : mixed
Parameters
- $preLoadedComponents : array<string|int, mixed>
-
An array containing the preloaded components
callHook()
Calls a hook on a component
protected
callHook(SystemComponentController $component, mixed $hookName, array<string|int, mixed> $arguments) : mixed
Parameters
- $component : SystemComponentController
-
Component to call hook of
- $hookName : mixed
- $arguments : array<string|int, mixed>
-
Arguments for the hook
callHooks()
Calls a hook on all components
protected
callHooks(mixed $hookName, array<string|int, mixed> $arguments) : mixed
Parameters
- $hookName : mixed
- $arguments : array<string|int, mixed>
-
Arguments for the hook
decorate()
Decorates an entity or an array of entities
protected
decorate(mixed $components) : mixed
Parameters
- $components : mixed
-
SystemComponent or array of SystemComponents
Return values
mixed —SystemComponentController or array of SystemComponentControllers
decorateEntity()
Decorates a single entity
protected
decorateEntity(SystemComponent $component) : SystemComponentController
Parameters
- $component : SystemComponent
Return values
SystemComponentController —Decorated entity
getComponentControllerClassFor()
Returns class name to use for decoration
protected
getComponentControllerClassFor(SystemComponent $component) : string
If the component does not have a class named "ComponentController" the default SystemComponentController class is used
Parameters
- $component : SystemComponent
-
Component to get decoration class for
Return values
string —Full qualified class name