class OnClearEventArgs extends EventArgs (View source)

Provides event arguments for the onClear event.

Methods

__construct(ObjectManager $objectManager, string|null $entityClass = null)

No description

getObjectManager()

Retrieves the associated ObjectManager.

string|null
getEntityClass()

Returns the name of the entity class that is cleared, or null if all are cleared.

bool
clearsAllEntities()

Returns whether this event clears all entities.

Details

__construct(ObjectManager $objectManager, string|null $entityClass = null)

Parameters

ObjectManager $objectManager The object manager.
string|null $entityClass The optional entity class.

ObjectManager getObjectManager()

Retrieves the associated ObjectManager.

Return Value

ObjectManager

string|null getEntityClass()

Returns the name of the entity class that is cleared, or null if all are cleared.

Return Value

string|null

bool clearsAllEntities()

Returns whether this event clears all entities.

Return Value

bool