Flarum\Api\Controller\SetSettingsController::handle PHP Method

handle() public method

public handle ( Psr\Http\Message\ServerRequestInterface $request )
$request Psr\Http\Message\ServerRequestInterface
    public function handle(ServerRequestInterface $request)
    {
        $this->assertAdmin($request->getAttribute('actor'));
        $settings = $request->getParsedBody();
        foreach ($settings as $k => $v) {
            $this->dispatcher->fire(new PrepareSerializedSetting($k, $v));
            $this->settings->set($k, $v);
            $this->dispatcher->fire(new SettingWasSet($k, $v));
        }
        return new EmptyResponse(204);
    }
SetSettingsController