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


PHP Core::getRegisteredProviderExtensionKeys方法代码示例

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


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

示例1: getPathConfigurationsFromRootTypoScriptTemplates

 /**
  * Gets a collection of path configurations for content elements
  * based on each root TypoScript template in the provided array
  * of templates. Returns an array of paths indexed by the root
  * page UID.
  *
  * @param array $templates
  * @return array
  */
 protected function getPathConfigurationsFromRootTypoScriptTemplates($templates)
 {
     $allTemplatePaths = array();
     $registeredExtensionKeys = Core::getRegisteredProviderExtensionKeys('Content');
     foreach ($templates as $templateRecord) {
         $pageUid = $templateRecord['pid'];
         /** @var \TYPO3\CMS\Core\TypoScript\ExtendedTemplateService $template */
         $template = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
         $template->tt_track = 0;
         $template->init();
         /** @var \TYPO3\CMS\Frontend\Page\PageRepository $sys_page */
         $sys_page = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
         $rootLine = $sys_page->getRootLine($pageUid);
         $template->runThroughTemplates($rootLine);
         $template->generateConfig();
         $oldTemplatePathLocation = (array) $template->setup['plugin.']['tx_fed.']['fce.'];
         $newTemplatePathLocation = (array) $template->setup['plugin.']['tx_fluidcontent.']['collections.'];
         $registeredPathCollections = array();
         foreach ($registeredExtensionKeys as $registeredExtensionKey) {
             $nativeViewLocation = $this->getContentConfiguration($registeredExtensionKey);
             if (FALSE === isset($nativeViewLocation['extensionKey'])) {
                 $nativeViewLocation['extensionKey'] = ExtensionNamingUtility::getExtensionKey($registeredExtensionKey);
             }
             $registeredPathCollections[$registeredExtensionKey] = $nativeViewLocation;
         }
         $merged = GeneralUtility::array_merge_recursive_overrule($oldTemplatePathLocation, $newTemplatePathLocation);
         $merged = GeneralUtility::removeDotsFromTS($merged);
         $merged = GeneralUtility::array_merge($merged, $registeredPathCollections);
         $allTemplatePaths[$pageUid] = $merged;
     }
     return $allTemplatePaths;
 }
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:41,代码来源:ConfigurationService.php

示例2: canRegisterProviderExtensionKey

 /**
  * @test
  */
 public function canRegisterProviderExtensionKey()
 {
     $fakeExtensionKey = 'flux';
     $fakeControllerName = 'Flux';
     Core::registerProviderExtensionKey($fakeExtensionKey, $fakeControllerName);
     $registered = Core::getRegisteredProviderExtensionKeys($fakeControllerName);
     $this->assertContains($fakeExtensionKey, $registered);
 }
开发者ID:busynoggin,项目名称:flux,代码行数:11,代码来源:CoreTest.php

示例3: getPageConfiguration

 /**
  * Get definitions of paths for Page Templates defined in TypoScript
  *
  * @param string $extensionName
  * @return array
  * @api
  */
 public function getPageConfiguration($extensionName = null)
 {
     if (null !== $extensionName && true === empty($extensionName)) {
         // Note: a NULL extensionName means "fetch ALL defined collections" whereas
         // an empty value that is not null indicates an incorrect caller. Instead
         // of returning ALL paths here, an empty array is the proper return value.
         // However, dispatch a debug message to inform integrators of the problem.
         $this->message('Template paths have been attempted fetched using an empty value that is NOT NULL in ' . get_class($this) . '. This indicates a potential problem with your TypoScript configuration - a ' . 'value which is expected to be an array may be defined as a string. This error is not fatal but may ' . 'prevent the affected collection (which cannot be identified here) from showing up', GeneralUtility::SYSLOG_SEVERITY_NOTICE);
         return [];
     }
     if (null !== $extensionName) {
         return $this->getViewConfigurationForExtensionName($extensionName);
     }
     $configurations = [];
     $registeredExtensionKeys = Core::getRegisteredProviderExtensionKeys('Page');
     foreach ($registeredExtensionKeys as $registeredExtensionKey) {
         $configurations[$registeredExtensionKey] = $this->getViewConfigurationForExtensionName($registeredExtensionKey);
     }
     return $configurations;
 }
开发者ID:fluidtypo3,项目名称:fluidpages,代码行数:27,代码来源:ConfigurationService.php

示例4: getContentConfiguration

 /**
  * Get definitions of paths for FCEs defined in TypoScript
  *
  * @param string $extensionName
  * @return array
  * @api
  */
 public function getContentConfiguration($extensionName = NULL)
 {
     if (NULL !== $extensionName) {
         return $this->getViewConfigurationForExtensionName($extensionName);
     }
     $registeredExtensionKeys = (array) Core::getRegisteredProviderExtensionKeys('Content');
     $configuration = array();
     foreach ($registeredExtensionKeys as $registeredExtensionKey) {
         $configuration[$registeredExtensionKey] = $this->getContentConfiguration($registeredExtensionKey);
     }
     return $configuration;
 }
开发者ID:sitegeist,项目名称:fluidcontent,代码行数:19,代码来源:ConfigurationService.php

示例5: performDummyRegistration

 /**
  * @return void
  */
 protected function performDummyRegistration()
 {
     Core::registerProviderExtensionKey($this->extensionName, $this->getControllerName());
     $this->assertContains($this->extensionName, Core::getRegisteredProviderExtensionKeys($this->getControllerName()));
 }
开发者ID:JostBaron,项目名称:flux,代码行数:8,代码来源:AbstractFluxControllerTestCase.php

示例6: getRegisteredProviderExtensionKeys

 /**
  * @return array
  */
 protected function getRegisteredProviderExtensionKeys()
 {
     return Core::getRegisteredProviderExtensionKeys('Backend');
 }
开发者ID:fluidtypo3,项目名称:fluidbackend,代码行数:7,代码来源:ConfigurationService.php

示例7: getPageConfiguration

 /**
  * Get definitions of paths for Page Templates defined in TypoScript
  *
  * @param string $extensionName
  * @return array
  * @api
  */
 public function getPageConfiguration($extensionName = NULL)
 {
     $cacheKey = NULL === $extensionName ? 'pages_global' : 'pages_' . $extensionName;
     if (TRUE === isset(self::$cache[$cacheKey])) {
         return self::$cache[$cacheKey];
     }
     if (NULL !== $extensionName && TRUE === empty($extensionName)) {
         // Note: a NULL extensionName means "fetch ALL defined collections" whereas
         // an empty value that is not null indicates an incorrect caller. Instead
         // of returning ALL paths here, an empty array is the proper return value.
         // However, dispatch a debug message to inform integrators of the problem.
         $this->message('Template paths have been attempted fetched using an empty value that is NOT NULL in ' . get_class($this) . '. This indicates a potential problem with your TypoScript configuration - a value which is expected to be ' . 'an array may be defined as a string. This error is not fatal but may prevent the affected collection (which cannot ' . 'be identified here) from showing up', GeneralUtility::SYSLOG_SEVERITY_NOTICE);
         return array();
     }
     if (TYPO3_MODE === 'BE') {
         // Hack. This is no fun matter, but the TYPO3 BackendConfigurationManager
         // is incapable of considering how to fetch a page UID from the "editconf"
         // array which is used when editing a particular page. The result is that
         // because Flux uses Extbase's resolve methods for TypoScript, the methods
         // will use the fallback behavior (only root TS templates). Forcibly setting
         // this GET['id'] should not have a negative effect on other scripts and will
         // fix the problem - because Extbase will instantly detect and use this ID.
         // New behaviour has one flaw: editing multiple pages will cause every page
         // to use the first page's TypoScript settings and therefore page templates -
         // which could be a problem when editing multiple pages each having own TS.
         if (TRUE === isset($GLOBALS['SOBE']->editconf['pages'])) {
             $_GET['id'] = key($GLOBALS['SOBE']->editconf['pages']);
         }
     }
     $newLocation = (array) $this->getTypoScriptSubConfiguration($extensionName, 'collections', 'fluidpages');
     $oldLocation = (array) $this->getTypoScriptSubConfiguration($extensionName, 'page', 'fed');
     $merged = (array) GeneralUtility::array_merge_recursive_overrule($oldLocation, $newLocation);
     if (NULL === $extensionName) {
         $registeredExtensionKeys = Core::getRegisteredProviderExtensionKeys('Page');
         foreach ($registeredExtensionKeys as $registeredExtensionKey) {
             $extensionViewPaths = $this->getPageConfiguration($registeredExtensionKey);
             if (FALSE === isset($extensionViewPaths['extensionKey'])) {
                 $extensionViewPaths['extensionKey'] = ExtensionNamingUtility::getExtensionKey($registeredExtensionKey);
             }
             // preemptive caching; once read here, the cached value is returned when asking for specific extensions later
             if (FALSE === isset($extensionViewPaths['templateRootPath'])) {
                 $this->sendWarningAboutMissingTemplatePath($registeredExtensionKey);
                 continue;
             }
             self::$cache[$registeredExtensionKey] = $extensionViewPaths;
             $merged[$registeredExtensionKey] = $extensionViewPaths;
         }
     } else {
         $nativeViewLocation = $this->getViewConfigurationForExtensionName($extensionName);
         if (TRUE === is_array($nativeViewLocation)) {
             $merged = GeneralUtility::array_merge_recursive_overrule($nativeViewLocation, $merged);
         }
         if (FALSE === isset($nativeViewLocation['extensionKey'])) {
             $merged['extensionKey'] = ExtensionNamingUtility::getExtensionKey($extensionName);
         }
         if (FALSE === isset($merged['templateRootPath'])) {
             $this->sendWarningAboutMissingTemplatePath($extensionName);
         }
     }
     self::$cache[$cacheKey] = $merged;
     return $merged;
 }
开发者ID:chrmue01,项目名称:typo3-starter-kit,代码行数:69,代码来源:ConfigurationService.php


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