/** * Initialize the Widget Context, before the Render method is called. * * @return void */ private function initializeWidgetContext() { $this->widgetContext->setWidgetConfiguration($this->getWidgetConfiguration()); $this->initializeWidgetIdentifier(); $this->widgetContext->setControllerObjectName(get_class($this->controller)); $extensionName = $this->controllerContext->getRequest()->getControllerExtensionName(); $pluginName = $this->controllerContext->getRequest()->getPluginName(); $this->widgetContext->setParentExtensionName($extensionName); $this->widgetContext->setParentPluginName($pluginName); $pluginNamespace = $this->extensionService->getPluginNamespace($extensionName, $pluginName); $this->widgetContext->setParentPluginNamespace($pluginNamespace); $this->widgetContext->setWidgetViewHelperClassName(get_class($this)); if ($this->ajaxWidget === true) { $this->ajaxWidgetContextHolder->store($this->widgetContext); } }
/** * @test */ public function controllerObjectNameCanBeReadAgain() { $this->widgetContext->setControllerObjectName('Tx_Fluid_Object_Name'); $this->assertEquals('Tx_Fluid_Object_Name', $this->widgetContext->getControllerObjectName()); }