Neos.ContentRepository/Classes/Command/NodeCommandControllerPlugin.php
public function on(string $eventIdentifier, \Closure $callback): void
    {
        $this->eventCallbacks[$eventIdentifier][] = $callback;
    }
public function on(string $eventIdentifier, \Closure $callback): void
    {
        $this->eventCallbacks[$eventIdentifier][] = $callback;
    }
public function on ( string $ eventIdentifier , \ Closure $ callback ) : void { $ this -> eventCallbacks [ $ eventIdentifier ] [ ] = $ callback ; }
Attaches a new event handler

@param string $eventIdentifier one of the EVENT_* constants
@param \Closure $callback a closure to be invoked when the corresponding event was triggered
@return void
Attaches a new event handler