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


PHP Flux\Core类代码示例

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


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

示例1: processData

 /**
  * @return void
  */
 public function processData()
 {
     $objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     /** @var FluxService $fluxService */
     $fluxService = $objectManager->get('FluidTYPO3\\Flux\\Service\\FluxService');
     $fluxService->initializeObject();
     /** @var DataMapFactory $dataMapFactory */
     $dataMapFactory = $objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapFactory');
     $forms = Core::getRegisteredFormsForTables();
     $models = Core::getRegisteredFormsForModelObjectClasses();
     foreach ($forms as $fullTableName => $form) {
         $this->processFormForTable($fullTableName, $form);
     }
     foreach ($models as $modelClassName => $form) {
         $map = $dataMapFactory->buildDataMap($modelClassName);
         $fullTableName = $map->getTableName();
         if (NULL === $form) {
             $form = $this->generateFormInstanceFromClassName($modelClassName, $fullTableName);
         }
         if (NULL === $form->getName()) {
             $form->setName($fullTableName);
         }
         $this->processFormForTable($fullTableName, $form);
     }
 }
开发者ID:chrmue01,项目名称:typo3-starter-kit,代码行数:28,代码来源:TableConfigurationPostProcessor.php

示例2: setup

 /**
  * Setup
  */
 public function setup()
 {
     $providers = Core::getRegisteredFlexFormProviders();
     if (TRUE === in_array('FluidTYPO3\\Flux\\Service\\FluxService', $providers)) {
         Core::unregisterConfigurationProvider('FluidTYPO3\\Flux\\Service\\FluxService');
     }
 }
开发者ID:JostBaron,项目名称:flux,代码行数:10,代码来源:FluxServiceTest.php

示例3: testGetContentConfiguration

 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);
 }
开发者ID:bednee,项目名称:fluidcontent,代码行数:8,代码来源:ConfigurationServiceTest.php

示例4: preprocessIncludeStaticTypoScriptSources

 /**
  * Includes static template from extensions
  *
  * @param array $params
  * @param TemplateService $pObj
  * @return void
  */
 public function preprocessIncludeStaticTypoScriptSources(array &$params, TemplateService $pObj)
 {
     if (TRUE === isset($params['row']['root']) && TRUE === (bool) $params['row']['root']) {
         $existingTemplates = GeneralUtility::trimExplode(',', $params['row']['include_static_file']);
         $globalStaticTemplates = Core::getStaticTypoScript();
         $staticTemplates = array_merge($globalStaticTemplates, $existingTemplates);
         $params['row']['include_static_file'] = implode(',', array_unique($staticTemplates));
     }
 }
开发者ID:chrmue01,项目名称:typo3-starter-kit,代码行数:16,代码来源:TypoScriptTemplate.php

示例5: throwsExceptionWhenResolvingInvalidConfigurationProviderInstances

 /**
  * @test
  */
 public function throwsExceptionWhenResolvingInvalidConfigurationProviderInstances()
 {
     $instance = $this->createInstance();
     $record = array('test' => 'test');
     Core::registerConfigurationProvider('FluidTYPO3\\Flux\\Service\\FluxService');
     $this->setExpectedException('RuntimeException', NULL, 1327173536);
     $instance->flushCache();
     $instance->resolveConfigurationProviders('tt_content', 'pi_flexform', $record);
     Core::unregisterConfigurationProvider('FluidTYPO3\\Flux\\Service\\FluxService');
 }
开发者ID:chrmue01,项目名称:typo3-starter-kit,代码行数:13,代码来源:FluxServiceTest.php

示例6: testResolveDomainFormClassInstancesFromPackages

 /**
  * @test
  */
 public function testResolveDomainFormClassInstancesFromPackages()
 {
     $modelClassName = 'FluidTYPO3\\Flux\\Tests\\Fixtures\\Classes\\Domain\\Model\\Dummy';
     Core::registerAutoFormForModelObjectClassName($modelClassName);
     $classNames = array('FluidTYPO3\\Flux\\Tests\\Fixtures\\Classes\\Domain\\Form\\DummyForm');
     $resolver = $this->getMock('FluidTYPO3\\Flux\\Helper\\Resolver', array('resolveClassNamesInPackageSubNamespace'));
     $resolver->expects($this->once())->method('resolveClassNamesInPackageSubNamespace')->willReturn($classNames);
     $result = $resolver->resolveDomainFormClassInstancesFromPackages(array('foobar'));
     $this->assertInstanceOf($classNames[0], $result[$modelClassName]);
 }
开发者ID:JostBaron,项目名称:flux,代码行数:13,代码来源:ResolveUtilityTest.php

示例7: leavesRecordsWhichAreNotRootsUntouched

 /**
  * @test
  */
 public function leavesRecordsWhichAreNotRootsUntouched()
 {
     Core::addStaticTypoScript(self::FIXTURE_TYPOSCRIPT_DIR);
     $function = 'FluidTYPO3\\Flux\\Backend\\TypoScriptTemplate->preprocessIncludeStaticTypoScriptSources';
     $template = $this->objectManager->get('TYPO3\\CMS\\Core\\TypoScript\\TemplateService');
     $parameters = array('row' => Records::$sysTemplateRoot);
     $parameters['row']['root'] = 0;
     GeneralUtility::callUserFunction($function, $parameters, $template);
     $this->assertNotContains(self::FIXTURE_TYPOSCRIPT_DIR, $parameters['row']['include_static_file']);
     $this->assertSame(Records::$sysTemplateRoot['include_static_file'], $parameters['row']['include_static_file']);
 }
开发者ID:JostBaron,项目名称:flux,代码行数:14,代码来源:TypoScriptTemplateTest.php

示例8: leavesRecordsWhichAreNotRootsUntouched

 /**
  * @test
  */
 public function leavesRecordsWhichAreNotRootsUntouched()
 {
     \FluidTYPO3\Flux\Core::addStaticTypoScript(self::FIXTURE_TYPOSCRIPT_DIR);
     $function = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['includeStaticTypoScriptSources']['flux'];
     $template = $this->objectManager->get('t3lib_TStemplate');
     $parameters = array('row' => \FluidTYPO3\Flux\Tests\Fixtures\Data\Records::$sysTemplateRoot);
     $parameters['row']['root'] = 0;
     GeneralUtility::callUserFunction($function, $parameters, $template);
     $this->assertNotContains(self::FIXTURE_TYPOSCRIPT_DIR, $parameters['row']['include_static_file']);
     $this->assertSame(\FluidTYPO3\Flux\Tests\Fixtures\Data\Records::$sysTemplateRoot['include_static_file'], $parameters['row']['include_static_file']);
 }
开发者ID:chrmue01,项目名称:typo3-starter-kit,代码行数:14,代码来源:TypoScriptTemplateTest.php

示例9: triggersDomainModelAnalysisWhenFormsAreRegistered

 /**
  * @test
  */
 public function triggersDomainModelAnalysisWhenFormsAreRegistered()
 {
     $class = 'FluidTYPO3\\Flux\\Tests\\Fixtures\\Classes\\Domain\\Model\\Dummy';
     $form = Form::create();
     $form->setExtensionName('FluidTYPO3.Flux');
     Core::registerAutoFormForModelObjectClassName($class);
     $object = GeneralUtility::getUserObj('FluidTYPO3\\Flux\\Backend\\TableConfigurationPostProcessor');
     $object->processData();
     Core::registerFormForModelObjectClassName($class, $form);
     $result = $object->processData();
     $this->assertEmpty($result);
 }
开发者ID:JostBaron,项目名称:flux,代码行数:15,代码来源:TableConfigurationPostProcessorTest.php

示例10: testRegisterModuleBasedOnFluxForm

 /**
  * @dataProvider getRegisterModuleBasedOnFluxFormTestValues
  * @param string $extension
  * @param Form $form
  * @param boolean $expectsException
  */
 public function testRegisterModuleBasedOnFluxForm($extension, Form $form, $expectsException)
 {
     $instance = new ConfigurationService();
     Core::registerProviderExtensionKey($extension, 'Backend');
     if (TRUE === $expectsException) {
         $this->setExpectedException('RuntimeException');
     }
     $GLOBALS['TBE_MODULES'] = array('fake' => array());
     $instance->registerModuleBasedOnFluxForm($extension, $form);
     if (FALSE === $expectsException) {
         $this->assertNotEmpty($GLOBALS['TBE_MODULES']);
     }
     unset($GLOBALS['TBE_MODULES']);
 }
开发者ID:fluidtypo3,项目名称:fluidbackend,代码行数:20,代码来源:ConfigurationServiceTest.php

示例11: createPipeSheet

 /**
  * @param string $name
  * @return void
  */
 protected function createPipeSheet($name)
 {
     $sheet = $this->createContainer('Sheet', $name)->createContainer('Section', $name);
     $namespace = 'FluidTYPO3\\Flux\\Outlet\\Pipe\\';
     $pipes = FluxCore::getPipes();
     foreach ($pipes as $pipeTypeOrClassName) {
         $className = TRUE === class_exists($pipeTypeOrClassName) ? $pipeTypeOrClassName : $namespace . ucfirst($pipeTypeOrClassName) . 'Pipe';
         if ('FluidTYPO3\\Flux\\Outlet\\Pipe\\StandardPipe' === $className) {
             continue;
         }
         $instance = $this->objectManager->get($className);
         $label = $instance->getLabel();
         /** @var PipeObject $pipe */
         $pipe = $sheet->createContainer('FluidTYPO3\\Fromage\\Backend\\FormComponent\\PipeObject', $pipeTypeOrClassName);
         $pipe->setLabel($label)->addAll($instance->getFormFields());
     }
 }
开发者ID:adrolli,项目名称:fromage,代码行数:21,代码来源:StandardForm.php

示例12: 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

示例13: processData

 /**
  * @return void
  */
 public function processData()
 {
     if (TYPO3_REQUESTTYPE_INSTALL !== (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
         $objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
         $objectManager->get('FluidTYPO3\\Flux\\Provider\\ProviderResolver')->loadTypoScriptConfigurationProviderInstances();
         $forms = Core::getRegisteredFormsForTables();
         $models = Core::getRegisteredFormsForModelObjectClasses();
         $packages = array_keys(Core::getRegisteredPackagesForAutoForms());
         foreach ($packages as $packageName) {
             list($vendorName, $extensionName) = explode('.', $packageName);
             $namespace = $vendorName . '\\' . $extensionName . '\\Domain\\';
             $extensionKey = ExtensionNamingUtility::getExtensionKey($packageName);
             $folder = ExtensionManagementUtility::extPath($extensionKey, 'Classes/Domain/Form/');
             $files = glob($folder . '*Form.php');
             $files = FALSE === $files ? array() : $files;
             foreach ($files as $fileName) {
                 $basename = pathinfo($fileName, PATHINFO_FILENAME);
                 $formClassName = $namespace . 'Form\\' . $basename;
                 $modelClassName = $namespace . 'Model\\' . substr($basename, 0, -4);
                 $fullTableName = $this->resolveTableName($modelClassName);
                 $models[$modelClassName] = $formClassName::create();
                 $models[$modelClassName]->setName($fullTableName);
                 $models[$modelClassName]->setExtensionName($packageName);
             }
         }
         foreach ($forms as $fullTableName => $form) {
             $this->processFormForTable($fullTableName, $form);
         }
         foreach ($models as $modelClassName => $form) {
             $fullTableName = $this->resolveTableName($modelClassName);
             if (NULL === $form) {
                 $form = $this->generateFormInstanceFromClassName($modelClassName, $fullTableName);
             }
             if (NULL === $form->getName()) {
                 $form->setName($fullTableName);
             }
             $this->processFormForTable($fullTableName, $form);
         }
     }
 }
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:43,代码来源:TableConfigurationPostProcessor.php

示例14: die

<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Gloggi Abteilungen');
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Bm.' . $_EXTKEY, 'Content');
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Bm.' . $_EXTKEY, 'Page');
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Bm.' . $_EXTKEY, 'Backend');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_gloggiabteilungen_domain_model_abteilung', 'EXT:gloggiabteilungen/Resources/Private/Language/locallang_csh_tx_gloggiabteilungen_domain_model_abteilung.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_gloggiabteilungen_domain_model_abteilung');
$GLOBALS['TCA']['tx_gloggiabteilungen_domain_model_abteilung'] = array('ctrl' => array('title' => 'Gloggi Abteilung', 'label' => 'name', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'dividers2tabs' => TRUE, 'versioningWS' => 2, 'versioning_followPages' => TRUE, 'origUid' => 't3_origuid', 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', 'delete' => 'deleted', 'enablecolumns' => array('disabled' => 'hidden', 'starttime' => 'starttime', 'endtime' => 'endtime'), 'searchFields' => 'name,abkuerzung,logo,einzugsgebiet,koordinaten,beschreib,internet,email,', 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Abteilung.php', 'iconfile' => 'EXT:gloggiabteilungen/Resources/Public/Icons/ext_icon.png'));
开发者ID:boris85,项目名称:gloggiabteilungen,代码行数:12,代码来源:ext_tables.php

示例15: 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


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