class OnClearEventArgs extends EventArgs (View source)

Provides event arguments for the onClear event.

Methods

__construct(EntityManagerInterface $em, string|null $entityClass = null)

Constructor.

getEntityManager()

Retrieves associated EntityManager.

string|null
getEntityClass()

Name of the entity class that is cleared, or empty if all are cleared.

bool
clearsAllEntities()

Checks if event clears all entities.

Details

__construct(EntityManagerInterface $em, string|null $entityClass = null)

Constructor.

Parameters

EntityManagerInterface $em
string|null $entityClass Optional entity class.

EntityManager getEntityManager()

Retrieves associated EntityManager.

Return Value

EntityManager

string|null getEntityClass()

Name of the entity class that is cleared, or empty if all are cleared.

Return Value

string|null

bool clearsAllEntities()

Checks if event clears all entities.

Return Value

bool