Add TYPO3 version range dependency to generated language pack extension
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 16 Jan 2014 22:49:01 +0000 (22:49 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 16 Jan 2014 22:49:01 +0000 (22:49 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/static_info_tables/trunk@83250 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
Classes/Controller/ManagerController.php
Classes/Domain/Model/LanguagePack.php
Classes/Domain/Repository/LanguagePackRepository.php
Resources/Private/LanguagePackTemplate/ext_emconf.php

index f848074..7a632dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * Follow-up to #55081: Fatal error in Static Info Tables Manager module in TYPO3 6.2
        * Clean-up in class SJBR\StaticInfoTables\Hook\Backend\Form\SuggestReceiver
        * Clean-up in class SJBR\StaticInfoTables\Hook\Backend\Form\ElementRenderingHelper
+       * Add TYPO3 version range dependency to generated language pack extension
 
 2013-12-03  Stanislas Rolland  <typo3@sjbr.ca>
 
index 0a2c1ab..0a30ab5 100644 (file)
@@ -194,6 +194,7 @@ class ManagerController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll
                $localeUtility = $this->objectManager->get('SJBR\\StaticInfoTables\\Utility\\LocaleUtility');
                $language = $localeUtility->getLanguageFromLocale($locale);
                $languagePack->setLanguage($language);
+               $languagePack->setTypo3VersionRange($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][\TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($this->extensionName)]['constraints']['depends']['typo3']);
                // If version is not set, use the version of the base extension
                if (!$languagePack->getVersion()) {
                        $languagePack->setVersion($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][\TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($this->extensionName)]['version']);
index a3eae28..49d5d09 100644 (file)
@@ -75,6 +75,11 @@ class LanguagePack extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        /**
         * @var string
         */
+       protected $typo3VersionRange;
+
+       /**
+        * @var string
+        */
        protected $version;
 
        /**
@@ -216,6 +221,14 @@ class LanguagePack extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
                return $this->language;
        }
 
+       public function setTypo3VersionRange($typo3VersionRange) {
+               $this->typo3VersionRange = $typo3VersionRange;
+       }
+
+       public function getTypo3VersionRange() {
+               return $this->typo3VersionRange;
+       }
+
        public function setVersion($version) {
                $this->version = $version;
        }
index 18da875..a5cce81 100644 (file)
@@ -92,6 +92,7 @@ class LanguagePackRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
                        '###LANG_ISO_LOWER###' => $localeLowerCase,
                        '###LANG_ISO_UPPER###' => $localeUpperCase,
                        '###LANG_ISO_CAMEL###' => $localeCamel,
+                       '###TYPO3_VERSION_RANGE###' => $languagePack->getTypo3VersionRange(),
                        '###VERSION###' => $languagePack->getVersion(),
                        '###LANG_NAME###' => $languagePack->getLanguage(),
                        '###AUTHOR###' => $languagePack->getAuthor(),
index c5e84ad..061a8d2 100644 (file)
@@ -29,7 +29,8 @@ $EM_CONF[$_EXTKEY] = Array (
        'CGLcompliance_note' => '',
        'constraints' => array (
                'depends' => array(
-                   'static_info_tables' => '###VERSION_BASE###-',
+                       'typo3' => '###TYPO3_VERSION_RANGE###',
+                       'static_info_tables' => '###VERSION_BASE###-',
                ),
                'conflicts' => array(
                ),