Stores the WidgetContext inside the Context, and sets the
AjaxWidgetIdentifier inside the Widget Context correctly.

@param WidgetContext $widgetContext
@return void
@Flow\Session(autoStart=true)
542044
public function store(WidgetContext $widgetContext)
    {
        $ajaxWidgetId = $this->nextFreeAjaxWidgetId++;
        $widgetContext->setAjaxWidgetIdentifier($ajaxWidgetId);
        $this->widgetContexts[$ajaxWidgetId] = $widgetContext;
    }
486152
public void createUISharedContext(Context context) {
		if (session != null) {
			uiContexts.put(context.getIndex(), context.duplicate());
		}
	}
17730
public function init(ServerContextInterface $serverContext)
    {

        // initialize the server context
        $this->serverContext = $serverContext;

        // initialize the profile logger
        if ($serverContext->hasLogger(LoggerUtils::PROFILE)) {
            $this->profileLogger = $serverContext->getLogger(LoggerUtils::PROFILE);
        }
    }
1356623
public function setContext(FormContext $context){
		$old = $this->context;
		$this->context = $context;
		return $old;
	}
501078
public function initContext()
    {
        $this->context = array();

        $this->addContext('time', microtime(true));

        $this->addContext('bouncer', array('pid' => getmypid()));
    }
265143
public function updateUserContext(UserContext $context): void
    {
        $context->addParameter(
            'userId',
            $this->repository->getPermissionResolver()->getCurrentUserReference()->getUserId()
        );
    }
383700
public function initialize(ContextInterface $context)
    {
        $context->setDatabase($this->databaseName);
        $context->setAjaxSteps($this->ajaxSteps);
        $context->setAjaxTimeout($this->ajaxTimeout);
        $context->setScreenshotPath($this->screenshotPath);
        $context->setRegionMap($this->regionMap);
        $context->setAdminUrl($this->adminUrl);
        $context->setLoginUrl($this->loginUrl);
    }
1149371
public function flushToContext(ResponseContext $mainContext)
	{
		foreach ($this->getAllValues() as $key => $value) {
			$mainContext->setValue($key, $value);
		}

		foreach ($this->layoutSnippetResponses as $key => $responses) {
			foreach	($responses as $snippet) {
				$mainContext->addToLayoutSnippet($key, $snippet);
			}
		}
	}
1288498
protected function applyFilters(EventContext $context)
    {
        foreach($this->filters as $filter)
        {
            $e = $context->getEvent();
            if ($filter->match($e)){
                $filter->processEvent($context);
                $e->consume();
            }
        }
    }
1024565
protected function _afterBrowse(KControllerContextInterface $context)
    {
        $controller = $this->getController();

        if($controller->canAdd()) {
            $this->addCommand('new');
        }

        if($controller->canDelete()) {
            $this->addCommand('delete');
        }
    }
791866
public function setContext(RequestContext $context)
    {
        if (null !== $this->generator) {
            $this->getGenerator()->setContext($context);
        }
        $this->context = $context;
    }
768231
public function handle(ComponentContext $componentContext)
    {
        $response = $componentContext->getHttpResponse();
        $response = ResponseInformationHelper::makeStandardsCompliant($response, $componentContext->getHttpRequest());
        $componentContext->replaceHttpResponse($response);
    }
67396
public void init(ClientContext clientContext) {
        this.clientContext = clientContext;
        this.clientConnectionStrategyConfig = clientContext.getClientConfig().getConnectionStrategyConfig();
        this.logger = clientContext.getLoggingService().getLogger(ClientConnectionStrategy.class);
    }
382031
public function execute( DispatchContext $dispatchContext = null ) {
		foreach ( $this->callbacks as $callback ) {
			call_user_func_array( $callback, array( $dispatchContext ) );
		}
	}
867858
protected function _lockResource(KControllerContextInterface $context)
    {
        $domain = $this->getMixer()->getIdentifier()->domain;

        if ($domain === 'admin' || $this->getRequest()->query->layout === 'form') {
            parent::_lockResource($context);
        }
    }
1220768
private function createWidget($widgetConfiguration, Plugin $plugin)
    {
        $widget = new Widget();
        $widget->setPlugin($plugin);

        $this->persistWidget($widgetConfiguration, $widget);

        return $widget;
    }
1247869
public function setUser(SecurityContext $context)
    {
        $this->user = $context->getToken() ? $context->getToken()->getUser() : null;
    }