Resolves #62770: Replace deprecated calls to ObjectManager ->create() with ->get()
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 7 Nov 2014 19:54:02 +0000 (19:54 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 7 Nov 2014 19:54:02 +0000 (19:54 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/static_info_tables/trunk@86851 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
Classes/Controller/ManagerController.php
Classes/Domain/Repository/AbstractEntityRepository.php
Classes/Utility/LocaleUtility.php

index 7da3b20..d67f657 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-07  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Require TYPO3 CMS 6.2.0
+       * Resolves #62770: Replace deprecated calls to ObjectManager ->create() with ->get()
+
 2014-10-16  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Remove file Resources/Private/Language/pl.locallang_db.xlf
index 70b24db..777006d 100644 (file)
@@ -171,7 +171,7 @@ class ManagerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll
         */
        public function newLanguagePackAction(\SJBR\StaticInfoTables\Domain\Model\LanguagePack $languagePack = NULL) {
                if (!is_object($languagePack)) {
-                       $languagePack = $this->objectManager->create('SJBR\\StaticInfoTables\\Domain\\Model\\LanguagePack');
+                       $languagePack = $this->objectManager->get('SJBR\\StaticInfoTables\\Domain\\Model\\LanguagePack');
                }
                $languagePack->setVersion($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][\TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($this->extensionName)]['version']);
                $languagePack->setAuthor($GLOBALS['BE_USER']->user['realName']);
@@ -297,7 +297,7 @@ class ManagerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll
                foreach ($languages as $locale => $language) {
                        // No language pack for English
                        if ($locale != 'default') {
-                               $languageObject = $this->objectManager->create('SJBR\\StaticInfoTables\\Domain\\Model\\Language');
+                               $languageObject = $this->objectManager->get('SJBR\\StaticInfoTables\\Domain\\Model\\Language');
                                $languageObject->setCollatingLocale($locale);
                                $localizedLanguage = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('lang_' . $locale, 'Lang');
                                $label = ($localizedLanguage ? $localizedLanguage : $language) . ' (' . $locale . ')';
index ad68112..9b31fa2 100644 (file)
@@ -154,7 +154,7 @@ abstract class AbstractEntityRepository extends \TYPO3\CMS\Extbase\Persistence\R
                } else {
                        $query = $this->createQuery();
 
-                       $object = $this->objectManager->create($this->objectType);
+                       $object = $this->objectManager->get($this->objectType);
                        if (!array_key_exists($propertyName, $object->_getProperties())) {
                                throw new \InvalidArgumentException('The model "' . $this->objectType . '" has no property "' . $propertyName . '" to order by.', 1316607579);
                        }
index 0da0b9f..8787ce1 100644 (file)
@@ -59,7 +59,7 @@ class LocaleUtility {
                foreach ($languages as $locale => $language) {
                        // No language pack for English
                        if ($locale != 'default') {
-                               $languageObject = $this->objectManager->create('SJBR\\StaticInfoTables\\Domain\\Model\\Language');
+                               $languageObject = $this->objectManager->get('SJBR\\StaticInfoTables\\Domain\\Model\\Language');
                                $languageObject->setCollatingLocale($locale);
                                $localizedLanguage = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('lang_' . $locale, $this->extensionName);
                                $label = ($localizedLanguage ? $localizedLanguage : $language) . ' (' . $locale . ')';