class ContentObjectProxy (View source)

A Content Object Proxy object to connect domain models to nodes

This class is never used directly in userland but is instantiated automatically through setContentObject() in AbstractNodeData.

Properties

protected PersistenceManagerInterface $persistenceManager
protected string $targetType

Type of the target model

protected string $targetId

Technical identifier of the target object

protected object $contentObject

Methods

__construct(object $contentObject)

Constructs this content type

void
initializeObject()

Fetches the identifier from the set content object. If that is not using automatically introduced UUIDs by Flow it tries to call persistAll() and fetch the identifier again. If it still fails, an exception is thrown.

object
getObject()

Returns the real object this proxy stands for

Details

__construct(object $contentObject)

Constructs this content type

Parameters

object $contentObject

The content object that should be represented by this proxy

protected void initializeObject()

Fetches the identifier from the set content object. If that is not using automatically introduced UUIDs by Flow it tries to call persistAll() and fetch the identifier again. If it still fails, an exception is thrown.

Return Value

void

Exceptions

IllegalObjectTypeException

object getObject()

Returns the real object this proxy stands for

Return Value

object

The "content object" as it was originally passed to the constructor