Skip to content

Commit

Permalink
Merge pull request FluidTYPO3#264 from amkoroew/fixDeprecation
Browse files Browse the repository at this point in the history
[BUGFIX] Tx_Extbase_Object_ObjectManagerInterface::create() is deprecated
  • Loading branch information
Claus Due committed Jul 11, 2013
2 parents 57bc896 + 62ddda8 commit 4ef3cfd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private function writeCachedMergedFileAndReturnTag($assets, $type) {
*/
private function generateTagForAssetType($type, $content, $file = NULL) {
/** @var $tagBuilder Tx_Fluid_Core_ViewHelper_TagBuilder */
$tagBuilder = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TagBuilder');
$tagBuilder = $this->objectManager->get('Tx_Fluid_Core_ViewHelper_TagBuilder');
switch ($type) {
case 'js':
$tagBuilder->setTagName('script');
Expand Down Expand Up @@ -478,7 +478,7 @@ private function renderAssetAsFluidTemplate($asset) {
$fileContents = file_get_contents($templatePathAndFilename);
}
/** @var $view Tx_Fluid_View_StandaloneView */
$view = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
$view = $this->objectManager->get('Tx_Fluid_View_StandaloneView');
$view->setTemplateSource($fileContents);
$view->assignMultiple($variables);
$content = $view->render();
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Asset/AbstractAssetViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function injectAssetService(Tx_Vhs_Service_AssetService $assetService) {
*/
public function injectObjectManager(Tx_Extbase_Object_ObjectManagerInterface $objectManager) {
$this->objectManager = $objectManager;
$this->tagBuilder = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TagBuilder');
$this->tagBuilder = $this->objectManager->get('Tx_Fluid_Core_ViewHelper_TagBuilder');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Render/AbstractRenderViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function getPreparedClonedView() {
*/
protected function getPreparedView() {
/** @var $view Tx_Fluid_View_StandaloneView */
$view = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
$view = $this->objectManager->get('Tx_Fluid_View_StandaloneView');
return $view;
}

Expand Down
4 changes: 2 additions & 2 deletions Classes/ViewHelpers/Render/RequestViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ public function render(
}
$temporaryContentObject = new tslib_cObj();
/** @var Tx_Extbase_MVC_Web_Request $request */
$request = $this->objectManager->create($this->requestType);
$request = $this->objectManager->get($this->requestType);
$request->setControllerActionName($action);
$request->setControllerName($controller);
$request->setPluginName($pluginName);
$request->setControllerExtensionName($extensionName);
$request->setArguments($arguments);
try {
/** @var Tx_Extbase_MVC_ResponseInterface $response */
$response = $this->objectManager->create($this->responseType);
$response = $this->objectManager->get($this->responseType);
$this->configurationManager->setContentObject($temporaryContentObject);
$this->configurationManager->setConfiguration(
$this->configurationManager->getConfiguration(
Expand Down

0 comments on commit 4ef3cfd

Please sign in to comment.