Newscoop\Services\Plugins\PluginsService::renderPluginHooks PHP Method

renderPluginHooks() public method

Dispatch hook event and render collected Response objects
public renderPluginHooks ( string $eventName, mixed $subject = null, array $options = null ) : string
$eventName string
$subject mixed
$options array
return string
    public function renderPluginHooks($eventName, $subject = null, $options = null)
    {
        $content = '';
        $pluginHooksEvent = $this->dispatcher->dispatch($eventName, new PluginHooksEvent($subject, $options));
        foreach ($pluginHooksEvent->getHooksResponses() as $key => $response) {
            $content .= $response->getContent();
        }
        return $content;
    }