AfterInsert event listener.

@param array $args Event listener parameters
@return void
165058
public function afterInsert(&$args) {
        $model      = &$args[0];
        $data       = &$args[1];
        $primaryKey = &$args[2];
        $this->_afterSave($model, $primaryKey);
    }
18944
public function postFlush(PostFlushEventArgs $args): void
    {
        if (!empty($this->deleteSharingSubjects) || !empty($this->deleteSharingIdentities)) {
            $this->buildDeleteQuery($args->getEntityManager())->execute();
        }

        $this->deleteSharingSubjects = [];
        $this->deleteSharingIdentities = [];
    }
659544
public function postLoad(LifecycleEventArgs $args)
    {
        $entity = $args->getEntity();
        $metadata = $this->getTranslatableMetadata(get_class($entity));

        if ($metadata instanceof TranslatableMetadata) {
            if ($metadata->fallbackLocale) {
                $metadata->fallbackLocale->setValue($entity, $this->getFallbackLocale());
            }

            if ($metadata->currentLocale) {
                $metadata->currentLocale->setValue($entity, $this->getCurrentLocale());
            }
        }
    }
176838
public function postUpdate(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface) {
            $this->getService($args)->postUpdate($args->getObject());
        }
    }
963754
public function afterUpdate(array &$args) {
        // Check if an email address was changed. If so, send a validation email
        $data = $args[2];
        if (array_key_exists('email', $data) && $this->_validateEmail) {
            $this->_onEmailChange($data['email'], 'update');
        }
    }
337923
public function beforeUpdate(array &$args) {
        $data = &$args[1];
        foreach ($this->_fields as $field) {
            if (!empty($data[$field])) {
                $data[$field] = $this->filter($data[$field], $this->getConfig());
            }
        }
    }
876117
public function onFlush(OnFlushEventArgs $args): void
    {
        $token = $this->getTokenStorage()->getToken();

        if (!$this->getPermissionManager()->isEnabled()
                || null === $token || $token instanceof ConsoleToken) {
            return;
        }

        $uow = $args->getEntityManager()->getUnitOfWork();
        $createEntities = $uow->getScheduledEntityInsertions();
        $updateEntities = $uow->getScheduledEntityUpdates();
        $deleteEntities = $uow->getScheduledEntityDeletions();

        $this->postResetPermissions = array_merge($createEntities, $updateEntities, $deleteEntities);
        $this->getPermissionManager()->preloadPermissions($this->postResetPermissions);

        $this->checkAllScheduledByAction($createEntities, 'create');
        $this->checkAllScheduledByAction($updateEntities, 'update');
        $this->checkAllScheduledByAction($deleteEntities, 'delete');
    }
223689
public function fire($event, $args)
    {
        $onEvent = $this->getConfig('events.'.$event);

        if ($onEvent instanceof Closure) {
            $onEvent($args);
        }
    }
183885
protected function log(Args $args)
    {
        $message = sprintf("%s%s", $this->render($args), PHP_EOL);
        $this->logger->log($message, null, $this->registry->get());
    }
726537
private function on_mailer_init( array $args ) {

		$mailer = $args ? reset( $args ) : NULL;
		if ( $mailer instanceof \PHPMailer ) {
			$mailer->SMTPDebug   = 2;
			$mailer->Debugoutput = function ( $message ) {

				// Log the mailer debug message.
				do_action( \Inpsyde\Wonolog\LOG, new Debug( $message, Channels::HTTP ) );
			};
		}

		return new NullLog();
	}
45262
def _register_event_listeners(self, cls):
        
        event.listen(cls, 'after_insert', self._new_listener)
        event.listen(cls, 'after_update', self._update_listener)
        event.listen(cls, 'after_delete', self._delete_listener)
557489
public function notifyObservers($arg) {
        if($this->changed === false)
			return;
		
		$observers = count($this->observers);
		
        for ($i=0; $i<$observers; ++$i) {
            $this->observers[$i]->update($this, $arg);
        }
    }
1005495
public function onFlush(OnFlushEventArgs $args): void
    {
        $token = $this->getTokenStorage()->getToken();

        if (!$this->getPermissionManager()->isEnabled()
                || null === $token || $token instanceof ConsoleToken) {
            return;
        }

        $uow = $args->getEntityManager()->getUnitOfWork();
        $this->getObjectFilter()->beginTransaction();

        $this->checkAllScheduledByAction($uow->getScheduledEntityInsertions(), 'create');
        $this->checkAllScheduledByAction($uow->getScheduledEntityUpdates(), 'edit');
        $this->checkAllScheduledByAction($uow->getScheduledEntityDeletions(), 'delete');

        $this->getObjectFilter()->commit();
    }
775866
public function trigger(EventInterface $event, array $args = []){
        return call_user_func_array($this->callback, array_merge([$event], $args));
    }
864418
public function evaluateArgs(array $args) : void
    {
        array_shift($args);

        if (count($args) < 2) {
            $this->out->red("Not enough arguments: expects 2, got ".(count($args) - 1).".");
            return;
        }

        $this->setName($args[0]);
        $this->setLocation($args[1]);
        if (isset($args[2])) {
            $this->additionalArgs(array_slice($args, 2, count($args)));
        }

        return;
    }
771816
public function beforeInsert(&$args) {
        $model = &$args[0];
        $data  = &$args[1];
        $this->validate($data, $model);
    }
1312424
public function postLoad(LifecycleEventArgs $args) {
        $entity = $args->getEntity();
        if (!$this->hasInDecodedRegistry($entity, $args->getEntityManager())) {
            if ($this->processFields($entity, false)) {
                $this->addToDecodedRegistry($entity, $args->getEntityManager());
            }
        }
    }