FluidTYPO3\Flux\Core::registerProviderExtensionKey PHP Method

registerProviderExtensionKey() public static method

public static registerProviderExtensionKey ( string $extensionKey, string $providesControllerName = self::CONTROLLER_ALL ) : void
$extensionKey string
$providesControllerName string
return void
    public static function registerProviderExtensionKey($extensionKey, $providesControllerName = self::CONTROLLER_ALL)
    {
        if (FALSE === isset(self::$extensions[$providesControllerName])) {
            self::$extensions[$providesControllerName] = array();
        }
        if (FALSE === in_array($extensionKey, self::$extensions[$providesControllerName])) {
            array_push(self::$extensions[$providesControllerName], $extensionKey);
        }
    }

Usage Example

 public function testGetContentConfiguration()
 {
     Core::registerProviderExtensionKey('FluidTYPO3.Fluidcontent', 'Content');
     $service = $this->getMock('FluidTYPO3\\Fluidcontent\\Service\\ConfigurationService', array('dummy'), array(), '', FALSE);
     $service->injectConfigurationManager(GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface'));
     $result = $service->getContentConfiguration();
     $this->assertEquals(array('FluidTYPO3.Fluidcontent' => array('templateRootPaths' => array(10 => 'EXT:fluidcontent/Resources/Private/Templates/'), 'partialRootPaths' => array(10 => 'EXT:fluidcontent/Resources/Private/Partials/'), 'layoutRootPaths' => array(10 => 'EXT:fluidcontent/Resources/Private/Layouts/'))), $result);
 }
All Usage Examples Of FluidTYPO3\Flux\Core::registerProviderExtensionKey