Sets a list of observer events that will be logged if verbose output is enabled.

@param string $observerEvents List of observer events
624
public function setObserverEvents($observerEvents)
    {
        $this->observerEvents = [];

        $token = ' ,;';
        $ext = strtok($observerEvents, $token);

        while ($ext !== false) {
            $this->observerEvents[] = $ext;
            $ext = strtok($token);
        }
    }
646895
public function attach(ObserverInterface $observer)
    {
        $observers = $this->getObservers();

        foreach ($observer->getEvents() as $event) {
            $observers[$event][] = $observer;
        }

        $this->setObservers($observers);
    }
172430
public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $entity = $observer->getEntity();

        if ($entity->getVirtualRule() !== null) {
            $this->saveHandler->execute($entity);
        }
    }
638515
public function logEvents(array $auditLogs)
    {
        $client = $this->getConnection();
        $documents = $this->transformToDocuments($auditLogs);

        $client->addDocuments($documents);
    }
673676
public function removeObservableEvents($observables)
    {
        $observables = is_array($observables) ? $observables : func_get_args();

        $this->observables = array_diff($this->observables, $observables);
    }
661001
public void setObserver(Map<String, Object> observer) {
        removeEntriesStartingWith(OBSERVER);
        eventMap.putAll(observer);
    }
98161
public function registerEventListeners(DispatcherContract $events)
    {
        foreach ($this->listen as $event => $listeners) {
            $defaultPriority = 0;
            if (!is_array($listeners)) {
                $events->listen($event, $listeners);
                continue;
            }
            foreach ($listeners as $listener => $priority) {
                if (is_numeric($listener)) {
                    $listener = $priority;
                    $priority = $defaultPriority;
                }
                if (is_array($listener)) {
                    $priority = is_numeric(current($listener)) ? current($listener) : $defaultPriority;
                    $listener = key($listener);
                }
                $events->listen($event, $listener, $priority);
            }
        }
        foreach ($this->subscribe as $subscriber) {
            $events->subscribe($subscriber);
        }
    }
1006131
public void addObserver(OutputObserver observer)
    {
        if (_observers==null)
            _observers=new ArrayList(4);
        _observers.add(observer);
        _observers.add(null);
    }
796321
public function onFlush(OnFlushEventArgs $eventArgs)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        $entityManager = $eventArgs->getEntityManager();
        $unitOfWork = $entityManager->getUnitOfWork();

        foreach ($unitOfWork->getScheduledEntityInsertions() as $entity) {
            $className = get_class($entity);
            if (isset($this->monitorEntitiesSetting[$className])) {
                $entityMonitoringConfiguration = $this->monitorEntitiesSetting[$className];

                if (isset($entityMonitoringConfiguration['events']['created'])) {
                    $data = [];
                    foreach ($entityMonitoringConfiguration['data'] as $key => $eelExpression) {
                        $data[$key] = Utility::evaluateEelExpression($eelExpression, $this->eelEvaluator, ['entity' => $entity]);
                    }

                    $event = $this->eventEmittingService->emit($entityMonitoringConfiguration['events']['created'], $data);
                    $unitOfWork->computeChangeSet($entityManager->getClassMetadata(Event::class), $event);
                }
            }
        }

        foreach ($unitOfWork->getScheduledEntityDeletions() as $entity) {
            $className = get_class($entity);
            if (isset($this->monitorEntitiesSetting[$className])) {
                $entityMonitoringConfiguration = $this->monitorEntitiesSetting[$className];

                if (isset($entityMonitoringConfiguration['events']['deleted'])) {
                    $data = [];
                    foreach ($entityMonitoringConfiguration['data'] as $key => $eelExpression) {
                        $data[$key] = Utility::evaluateEelExpression($eelExpression, $this->eelEvaluator, ['entity' => $entity]);
                    }

                    $event = $this->eventEmittingService->emit($entityMonitoringConfiguration['events']['deleted'], $data);
                    $unitOfWork->computeChangeSet($entityManager->getClassMetadata(Event::class), $event);
                }
            }
        }
    }
371968
public void setRegisterForPostEvents(boolean registerEvents)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "setRegisterForPostEvents", Boolean.valueOf(registerEvents));
            SibTr.exit(this, tc, "setRegisterForPostEvents");
        }
        this.registerEvents = registerEvents;
    }
555603
public void setEvents(java.util.Collection<DeviceEvent> events) {
        if (events == null) {
            this.events = null;
            return;
        }

        this.events = new java.util.ArrayList<DeviceEvent>(events);
    }
136735
public function setEventManager( EventManagerInterface $events )
    {
        $events->setEventClass( __NAMESPACE__ . '\Event' );
        $events->attach( Event::EVENT_LOGIN,  array( $this, 'onLogin' ),  1000 );
        $events->attach( Event::EVENT_LOGOUT, array( $this, 'onLogout' ), 0    );
        return parent::setEventManager( $events );
    }
87177
public function setEventEmitter(EventEmitterInterface $emitter)
    {
        parent::setEventEmitter($emitter);
        foreach ($this->plugins as $plugin) {
            if (!($plugin instanceof EventEmitterAwareInterface)) {
                continue;
            }

            $plugin->setEventEmitter($emitter);
        }
    }
547294
public function registerListeners(DispatcherContract $events)
    {
        foreach ($this->listen as $event => $listeners) {
            foreach ($listeners as $listener) {
                $events->listen($event, $listener);
            }
        }
    }
1302565
public function notify($event, $params)
    {
        $observers = $this->getObservers();

        if (isset($observers[$event])) {
            foreach ($observers[$event] as $observer) {
                $observer->setTriggeredEvent($event);
                $observer->setTriggeredEventParams($params);
                $observer->setBag($this->getBag());
                $observer->run();
           }
        }
    }
460058
protected function registerPluginSubscribers(array $plugins)
    {
        $client = $this->getClient();
        foreach ($plugins as $plugin) {
            $this->validatePluginEvents($plugin);
            $callbacks = $plugin->getSubscribedEvents();
            foreach ($callbacks as $event => $callback) {
                $pluginCallback = [ $plugin, $callback ];
                if (is_callable($pluginCallback)) {
                    $callback = $pluginCallback;
                }
                $client->on($event, $callback);
            }
        }
    }
148263
public function setObserverType($observerType)
    {
        $allowedValues = $this->getObserverTypeAllowableValues();
        if (!in_array($observerType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'observerType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['observerType'] = $observerType;

        return $this;
    }