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


PHP t3lib_extMgm::getExtensionKeyByPrefix方法代码示例

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


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

示例1: execute

 /**
  * @return void
  */
 public function execute()
 {
     $contexts = array('BE', 'FE');
     if ($this->getExtensionKey()) {
         $extensionList = array($this->getExtensionKey());
     } else {
         $extensionList = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered();
     }
     foreach ($contexts as $context) {
         if (is_array($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) && count($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) > 0) {
             foreach ($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS'] as $targetClass => $implementationClass) {
                 if (is_file($implementationClass)) {
                     $path = str_replace(PATH_typo3conf . 'ext/', '', $implementationClass);
                     $extKey = current(explode('/', $path));
                 } else {
                     $extKey = t3lib_extMgm::getExtensionKeyByPrefix(strtolower($implementationClass));
                 }
                 if (!in_array($extKey, $extensionList)) {
                     continue;
                 }
                 $this->issues[] = $this->createIssue($context, $targetClass, $implementationClass, $extKey);
             }
         }
     }
 }
开发者ID:pitscribble,项目名称:typo3-upgradereport,代码行数:28,代码来源:Processor.php

示例2: getExtensionIcon

 /**
  * Get path to ext_icon.gif from processing instruction key
  *
  * @param string $key Like tx_realurl_rebuild
  * @return string
  */
 protected function getExtensionIcon($key)
 {
     $extIcon = '';
     if (method_exists(t3lib_extMgm, 'getExtensionKeyByPrefix')) {
         $parts = explode('_', $key);
         if (is_array($parts) && count($parts) > 2) {
             $extensionKey = t3lib_extMgm::getExtensionKeyByPrefix('tx_' . $parts[1]);
             $extIcon = t3lib_extMgm::extRelPath($extensionKey) . 'ext_icon.gif';
         }
     }
     return $extIcon;
 }
开发者ID:bia-nca,项目名称:crawler,代码行数:18,代码来源:class.tx_crawler_tcaFunc.php

示例3: attemptToLoadRegistryForGivenClassName

 /**
  * Try to load the entries for a given class name into the registry.
  *
  * First, figures out the extension the class belongs to.
  * Then, tries to load the ext_autoload.php file inside the extension directory, and adds its contents to the $classNameToFileMapping.
  *
  * @param	string	$className	Class Name
  */
 protected static function attemptToLoadRegistryForGivenClassName($className)
 {
     $classNameParts = explode('_', $className);
     $extensionPrefix = array_shift($classNameParts) . '_' . array_shift($classNameParts);
     $extensionKey = t3lib_extMgm::getExtensionKeyByPrefix($extensionPrefix);
     if (!$extensionKey || array_key_exists($extensionKey, self::$extensionHasAutoloadConfiguration)) {
         // extension key could not be determined or we already tried to load the extension's autoload configuration
         return;
     }
     $possibleAutoloadConfigurationFileName = t3lib_extMgm::extPath($extensionKey) . 'ext_autoload.php';
     if (file_exists($possibleAutoloadConfigurationFileName)) {
         self::$extensionHasAutoloadConfiguration[$extensionKey] = TRUE;
         $extensionClassNameToFileMapping = (require $possibleAutoloadConfigurationFileName);
         self::$classNameToFileMapping = array_merge($extensionClassNameToFileMapping, self::$classNameToFileMapping);
     } else {
         self::$extensionHasAutoloadConfiguration[$extensionKey] = FALSE;
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:26,代码来源:class.t3lib_autoloader.php

示例4: getExtensionKeyByPrefixForNotLoadedExtensionReturnsFalse

 /**
  * @test
  * @see t3lib_extMgm::getExtensionKeyByPrefix
  */
 public function getExtensionKeyByPrefixForNotLoadedExtensionReturnsFalse()
 {
     t3lib_extMgm::clearExtensionKeyMap();
     $uniqueSuffix = uniqid('test');
     $extensionKey = 'unloadedextension' . $uniqueSuffix;
     $extensionPrefix = 'tx_unloadedextension' . $uniqueSuffix;
     $this->assertFalse(t3lib_extMgm::getExtensionKeyByPrefix($extensionPrefix));
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:12,代码来源:t3lib_extmgmTest.php


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