当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_extMgm::getExtensionVersion方法代码示例

本文整理汇总了PHP中t3lib_extMgm::getExtensionVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_extMgm::getExtensionVersion方法的具体用法?PHP t3lib_extMgm::getExtensionVersion怎么用?PHP t3lib_extMgm::getExtensionVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_extMgm的用法示例。


在下文中一共展示了t3lib_extMgm::getExtensionVersion方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCategoryData

 /**
  * checks if there is a category assigned to the $newsRecord which has
  * its own single view page and if yes, returns the uid of the page
  * in $catagoryData['single_pid'].
  * It also compiles a list of all assigned categories and returns
  * it as an array in $categoryData['uid_list']. The titles of the
  * categories are returned in $categoryData['title_list'] (array)
  * 
  * @author Christian Bülter <buelter@kennziffer.com>
  * @since 26.06.13 14:34
  * @param type $newsRecord
  * @return int
  */
 private function getCategoryData($newsRecord)
 {
     $categoryData = array('single_pid' => 0, 'uid_list' => array(), 'title_list' => array());
     // news version 3 features system categories instead of it's own
     // category system used in previous versions
     if (TYPO3_VERSION_INTEGER < 6002000) {
         $ttnewsVersion = t3lib_extMgm::getExtensionVersion('news');
     } else {
         $ttnewsVersion = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('news');
     }
     if (version_compare($ttnewsVersion, '3.0.0') >= 0) {
         $where = ' AND tx_news_domain_model_news.uid = ' . $newsRecord['uid'] . ' AND sys_category_record_mm.tablenames = "tx_news_domain_model_news"';
         if (TYPO3_VERSION_INTEGER >= 7000000) {
             $where .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('sys_category') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_category');
         } else {
             $where .= t3lib_befunc::BEenableFields('sys_category') . t3lib_befunc::deleteClause('sys_category');
         }
         $resCat = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('sys_category.uid, sys_category.single_pid, sys_category.title', 'sys_category', 'sys_category_record_mm', 'tx_news_domain_model_news', $where, '', 'sys_category_record_mm.sorting');
     } else {
         $where = ' AND tx_news_domain_model_news.uid = ' . $newsRecord['uid'];
         if (TYPO3_VERSION_INTEGER >= 7000000) {
             $where .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('tx_news_domain_model_category') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tx_news_domain_model_category');
         } else {
             $where .= t3lib_befunc::BEenableFields('tx_news_domain_model_category') . t3lib_befunc::deleteClause('tx_news_domain_model_category');
         }
         $resCat = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('tx_news_domain_model_category.uid, tx_news_domain_model_category.single_pid, tx_news_domain_model_category.title', 'tx_news_domain_model_news', 'tx_news_domain_model_news_category_mm', 'tx_news_domain_model_category', $where, '', 'tx_news_domain_model_news_category_mm.sorting');
     }
     while ($newsCat = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resCat)) {
         $categoryData['uid_list'][] = $newsCat['uid'];
         $categoryData['title_list'][] = $newsCat['title'];
         if ($newsCat['single_pid'] && !$categoryData['single_pid']) {
             $categoryData['single_pid'] = $newsCat['single_pid'];
         }
     }
     return $categoryData;
 }
开发者ID:brainformatik,项目名称:ke_search,代码行数:49,代码来源:class.tx_kesearch_indexer_types_news.php

示例2: saveExtensionConfiguration

 /**
  * @param Tx_ExtensionBuilder_Domain_Model_Extension $extension
  */
 public function saveExtensionConfiguration(Tx_ExtensionBuilder_Domain_Model_Extension $extension)
 {
     $extensionBuildConfiguration = $this->configurationManager->getConfigurationFromModeler();
     $extensionBuildConfiguration['log'] = array('last_modified' => date('Y-m-d h:i'), 'extension_builder_version' => t3lib_extMgm::getExtensionVersion('extension_builder'), 'be_user' => $GLOBALS['BE_USER']->user['realName'] . ' (' . $GLOBALS['BE_USER']->user['uid'] . ')');
     t3lib_div::writeFile($extension->getExtensionDir() . Tx_ExtensionBuilder_Configuration_ConfigurationManager::EXTENSION_BUILDER_SETTINGS_FILE, json_encode($extensionBuildConfiguration));
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:9,代码来源:ExtensionRepository.php

示例3: simulateFrontendEnviroment

 /**
  * Simuliert ein einfaches FE zur testausführung
  * Wurde tx_phpunit_module1 entnommen da die Methode protected ist
  * und nicht bei der Ausführung auf dem CLI aufgerufen wird. Das
  * kann in manchen Fällen aber notwendig sein
  *
  * ACHTUNG bei Datenbank Testfällen!!!
  * Dann muss diese Funktion immer vor dem erstellen der Datenbank etc. ausgeführt
  * werden da sonst extra eine Seite in "pages" eingefügt werden muss.
  * In einem normalen TYPO3 gibt es bereits Seiten womit das vor dem
  * Aufsetzen der Testdatenbank ausgenutzt werden kann!!!
  *
  * @see tx_phpunit_module1::simulateFrontendEnviroment
  * @todo in eigene Klasse auslagern, die von tx_phpunit_module1 erbt und simulateFrontendEnviroment public macht
  * @deprecated use self::prepareTSFE()
  */
 public static function simulateFrontendEnviroment($extKey = 'mklib')
 {
     //wenn phpunit mindestens in version 3.5.14 installiert ist, nutzen
     //wir deren create frontend methode
     tx_rnbase::load('tx_rnbase_util_TYPO3');
     if (tx_rnbase_util_TYPO3::convertVersionNumberToInteger(t3lib_extMgm::getExtensionVersion('phpunit')) >= 3005014) {
         $oTestFramework = tx_rnbase::makeInstance('Tx_Phpunit_Framework', $extKey);
         return $oTestFramework->createFakeFrontEnd();
     }
     if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE'])) {
         // avoids some memory leaks
         unset($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, $GLOBALS['TSFE']->fe_user, $GLOBALS['TSFE']->TYPO3_CONF_VARS, $GLOBALS['TSFE']->config, $GLOBALS['TSFE']->TCAcachedExtras, $GLOBALS['TSFE']->imagesOnPage, $GLOBALS['TSFE']->cObj, $GLOBALS['TSFE']->csConvObj, $GLOBALS['TSFE']->pagesection_lockObj, $GLOBALS['TSFE']->pages_lockObj);
         $GLOBALS['TSFE'] = NULL;
         $GLOBALS['TT'] = NULL;
     }
     $GLOBALS['TT'] = t3lib_div::makeInstance('t3lib_TimeTrackNull');
     $frontEnd = t3lib_div::makeInstance('tslib_fe', $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
     // simulates a normal FE without any logged-in FE or BE user
     $frontEnd->beUserLogin = FALSE;
     $frontEnd->workspacePreview = '';
     $frontEnd->gr_list = '0,-1';
     $frontEnd->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
     $frontEnd->sys_page->init(TRUE);
     $frontEnd->initTemplate();
     // $frontEnd->getConfigArray() doesn't work here because the dummy FE
     // is not required to have a template.
     $frontEnd->config = array();
     $GLOBALS['TSFE'] = $frontEnd;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:45,代码来源:class.tx_mklib_tests_Util.php

示例4: searchAddressNominatim

 function searchAddressNominatim($query, &$address)
 {
     $ll = false;
     $xml = t3lib_div::getURL('http://nominatim.openstreetmap.org/search?' . http_build_query($query, '', '&'), false, 'User-Agent: TYPO3 extension ods_osm/' . t3lib_extMgm::getExtensionVersion('ods_osm'));
     if (TYPO3_DLOG && $xml === false) {
         t3lib_div::devLog('t3lib_div::getURL failed', 'ods_osm', 3);
     }
     if ($xml) {
         $xmlobj = new SimpleXMLElement($xml);
         if ($xmlobj->place) {
             $ll = true;
             $address['lat'] = (string) $xmlobj->place['lat'];
             $address['lon'] = (string) $xmlobj->place['lon'];
             if ($xmlobj->place->road) {
                 $address['street'] = (string) $xmlobj->place->road;
             }
             if ($xmlobj->place->house_number) {
                 $address['housenumber'] = (string) $xmlobj->place->house_number;
             }
             if ($xmlobj->place->postcode) {
                 $address['zip'] = (string) $xmlobj->place->postcode;
             }
             if ($xmlobj->place->city || $xmlobj->place->villag) {
                 $address['city'] = $xmlobj->place->city ? (string) $xmlobj->place->city : (string) $xmlobj->place->village;
             }
             if ($xmlobj->place->state) {
                 $address['state'] = (string) $xmlobj->place->state;
             }
             if ($xmlobj->place->country_code && empty($address['country'])) {
                 $address['country'] = strtoupper((string) $xmlobj->place->country_code);
             }
         }
     }
     return $ll;
 }
开发者ID:fabianlipp,项目名称:ods_osm,代码行数:35,代码来源:class.tx_odsosm_div.php

示例5: initializeAction

 /**
  * @return void
  */
 public function initializeAction()
 {
     $this->codeGenerator->setSettings($this->settings);
     if (floatval(t3lib_extMgm::getExtensionVersion('extbase')) < 1.3) {
         die('The Extension Builder requires at least Extbase/Fluid Version 1.3. Sorry!');
     }
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:10,代码来源:BuilderModuleController.php

示例6: initializeTypo3ExtensionArray

 /**
  * Loads all Extension-Versions from ext_emconf files
  *
  * @return void
  */
 protected function initializeTypo3ExtensionArray()
 {
     $extensionKeys = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensions();
     foreach ($extensionKeys as $extensionKey) {
         $this->installedTypo3Extensions[$extensionKey] = t3lib_extMgm::getExtensionVersion($extensionKey);
     }
 }
开发者ID:pitscribble,项目名称:typo3-upgradereport,代码行数:12,代码来源:RequirementsAnalyzer.php

示例7: getExtensionVersionForLoadedExtensionReturnsExtensionVersion

 /**
  * @test
  */
 public function getExtensionVersionForLoadedExtensionReturnsExtensionVersion()
 {
     t3lib_extMgm::clearExtensionKeyMap();
     $uniqueSuffix = uniqid('test');
     $extensionKey = 'unloadedextension' . $uniqueSuffix;
     $GLOBALS['TYPO3_LOADED_EXT'][$extensionKey] = array('siteRelPath' => 'typo3_src/tests/t3lib/fixtures/');
     $this->assertEquals('1.2.3', t3lib_extMgm::getExtensionVersion($extensionKey));
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:11,代码来源:t3lib_extmgmTest.php


注:本文中的t3lib_extMgm::getExtensionVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。