You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function createNew()
{
$className = $this->mapper->getEntityClass($this->getTable());
/** @var $entity BaseEntity */
$entity = new $className;
$this->events->invokeCallbacks(Events::EVENT_FOO, $entity);
return $entity;
}
ide o to Events::EVENT_FOO rad by som si do eventov pridal vlastny typ eventu a invokoval ho ked potrebujem
a tym padom ze to je v BaseRepository by som chcel mat ten event registrovany pre kazdy Repository preto by bolo super mat moznost pridat nejake zdielane eventy (napr do Events pridat nejake staticke pole kde budu tie zdielane eventy)
v BaseRepository mam metodu:
Events::EVENT_FOOrad by som si do eventov pridal vlastny typ eventu a invokoval ho ked potrebujem