Domain/DomainUtil.php
public static function getEventClasses($type)
    {
        $names = [PreUpsertsEvent::class, PostUpsertsEvent::class];

        if (Domain::TYPE_CREATE === $type) {
            $names = [PreCreatesEvent::class, PostCreatesEvent::class];
        } elseif (Domain::TYPE_UPDATE === $type) {
            $names = [PreUpdatesEvent::class, PostUpdatesEvent::class];
        } elseif (Domain::TYPE_DELETE === $type) {
            $names = [PreDeletesEvent::class, PostDeletesEvent::class];
        } elseif (Domain::TYPE_UNDELETE === $type) {
            $names = [PreUndeletesEvent::class, PostUndeletesEvent::class];
        }

        return $names;
    }
public static function getEventClasses($type)
    {
        $names = [PreUpsertsEvent::class, PostUpsertsEvent::class];

        if (Domain::TYPE_CREATE === $type) {
            $names = [PreCreatesEvent::class, PostCreatesEvent::class];
        } elseif (Domain::TYPE_UPDATE === $type) {
            $names = [PreUpdatesEvent::class, PostUpdatesEvent::class];
        } elseif (Domain::TYPE_DELETE === $type) {
            $names = [PreDeletesEvent::class, PostDeletesEvent::class];
        } elseif (Domain::TYPE_UNDELETE === $type) {
            $names = [PreUndeletesEvent::class, PostUndeletesEvent::class];
        }

        return $names;
    }
public static function getEventClasses ( $ type ) { $ names = [ PreUpsertsEvent :: class , PostUpsertsEvent :: class ] ; if ( Domain :: TYPE_CREATE === $ type ) { $ names = [ PreCreatesEvent :: class , PostCreatesEvent :: class ] ; } elseif ( Domain :: TYPE_UPDATE === $ type ) { $ names = [ PreUpdatesEvent :: class , PostUpdatesEvent :: class ] ; } elseif ( Domain :: TYPE_DELETE === $ type ) { $ names = [ PreDeletesEvent :: class , PostDeletesEvent :: class ] ; } elseif ( Domain :: TYPE_UNDELETE === $ type ) { $ names = [ PreUndeletesEvent :: class , PostUndeletesEvent :: class ] ; } return $ names ; }
Get the event names of persist action.

@param int $type The type of persist

@return array The list of pre event name and post event name
Get the event names of persist action .