‪TYPO3CMS  ‪main
TYPO3\CMS\Workspaces\Dependency\DependencyResolver Class Reference

Public Member Functions

 setWorkspace (int $workspace)
 
 getWorkspace ()
 
 setEventCallback (string $eventName, EventCallback $callback)
 
 executeEventCallback (string $eventName, object $caller, array $callerArguments=[])
 
 setOuterMostParentsRequireReferences (bool $outerMostParentsRequireReferences)
 
 addElement (string $table, int $id, array $data=[])
 
ElementEntity[] getOuterMostParents ()
 
 getNestedElements (ElementEntity $outerMostParent)
 
 getElements ()
 
 getFactory ()
 

Protected Member Functions

 processOuterMostParent (ElementEntity $element)
 

Protected Attributes

int $workspace = 0
 
DependencyEntityFactory $factory
 
array $elements = []
 
array $eventCallbacks = []
 
bool $outerMostParentsRequireReferences = false
 
array $outerMostParents
 

Detailed Description

Object to handle and determine dependent references of elements.

Definition at line 27 of file DependencyResolver.php.

Member Function Documentation

◆ addElement()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::addElement ( string  $table,
int  $id,
array  $data = [] 
)

◆ executeEventCallback()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::executeEventCallback ( string  $eventName,
object  $caller,
array  $callerArguments = [] 
)

Executes a registered callback (if any) for a particular event.

Definition at line 64 of file DependencyResolver.php.

Referenced by TYPO3\CMS\Workspaces\Dependency\ElementEntity\__construct().

◆ getElements()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::getElements ( )

◆ getFactory()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::getFactory ( )

Gets an instance of the factory to keep track of element or reference entities.

Definition at line 151 of file DependencyResolver.php.

References TYPO3\CMS\Workspaces\Dependency\DependencyResolver\$factory.

Referenced by TYPO3\CMS\Workspaces\Dependency\DependencyResolver\addElement().

◆ getNestedElements()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::getNestedElements ( ElementEntity  $outerMostParent)

Gets all nested elements (including the parent) of a particular outermost parent element.

Definition at line 130 of file DependencyResolver.php.

References TYPO3\CMS\Workspaces\Dependency\ElementEntity\__toString(), and TYPO3\CMS\Workspaces\Dependency\ElementEntity\getNestedChildren().

Referenced by TYPO3\CMS\Workspaces\DataHandler\CommandMap\applyWorkspacesDependencies().

◆ getOuterMostParents()

ElementEntity [] TYPO3\CMS\Workspaces\Dependency\DependencyResolver::getOuterMostParents ( )

◆ getWorkspace()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::getWorkspace ( )

Gets the current workspace.

Definition at line 47 of file DependencyResolver.php.

References TYPO3\CMS\Workspaces\Dependency\DependencyResolver\$workspace.

◆ processOuterMostParent()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::processOuterMostParent ( ElementEntity  $element)
protected

Processes and registers the outermost parents accordant to the registered elements.

Definition at line 114 of file DependencyResolver.php.

References TYPO3\CMS\Workspaces\Dependency\ElementEntity\getOuterMostParent(), and TYPO3\CMS\Workspaces\Dependency\ElementEntity\hasReferences().

Referenced by TYPO3\CMS\Workspaces\Dependency\DependencyResolver\getOuterMostParents().

◆ setEventCallback()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::setEventCallback ( string  $eventName,
EventCallback  $callback 
)

Sets a callback for a particular event.

Definition at line 55 of file DependencyResolver.php.

◆ setOuterMostParentsRequireReferences()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::setOuterMostParentsRequireReferences ( bool  $outerMostParentsRequireReferences)

Sets the condition that outermost parents required at least one child or parent reference.

Definition at line 77 of file DependencyResolver.php.

References TYPO3\CMS\Workspaces\Dependency\DependencyResolver\$outerMostParentsRequireReferences.

◆ setWorkspace()

TYPO3\CMS\Workspaces\Dependency\DependencyResolver::setWorkspace ( int  $workspace)

Sets the current workspace.

Definition at line 39 of file DependencyResolver.php.

References TYPO3\CMS\Workspaces\Dependency\DependencyResolver\$workspace.

Member Data Documentation

◆ $elements

array TYPO3\CMS\Workspaces\Dependency\DependencyResolver::$elements = []
protected

◆ $eventCallbacks

array TYPO3\CMS\Workspaces\Dependency\DependencyResolver::$eventCallbacks = []
protected

Definition at line 32 of file DependencyResolver.php.

◆ $factory

DependencyEntityFactory TYPO3\CMS\Workspaces\Dependency\DependencyResolver::$factory
protected

◆ $outerMostParents

array TYPO3\CMS\Workspaces\Dependency\DependencyResolver::$outerMostParents
protected

◆ $outerMostParentsRequireReferences

bool TYPO3\CMS\Workspaces\Dependency\DependencyResolver::$outerMostParentsRequireReferences = false
protected

◆ $workspace

int TYPO3\CMS\Workspaces\Dependency\DependencyResolver::$workspace = 0
protected