public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     // 1. Make Gedmo\Translatable\Entity\Translation known to Doctrine, so that it can participate in Database Schema Generation
     //
     // Internally, we use a MappingDriverChain for that, which delegates almost all of its behavior to the already-existing
     // FlowAnnotationDriver. We additionally add the (default doctrine) Annotation Driver for the Gedmo namespace.
     //
     // Note: We replace FlowAnnotationDriver *on a very low level* with the *MappingDriverChain* object; because this class
     // is only used inside EntityManagerFactory -- so we know quite exactly what methods are called on that object.
     $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'beforeInvokeStep', function ($step) use($bootstrap) {
         if ($step->getIdentifier() === 'typo3.flow:resources') {
             $flowAnnotationDriver = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Persistence\\Doctrine\\Mapping\\Driver\\FlowAnnotationDriver');
             $driverChain = new MappingDriverChainWithFlowAnnotationDriverAsDefault($flowAnnotationDriver);
             $driverChain->addDriver(new AnnotationDriver(ObjectAccess::getProperty($flowAnnotationDriver, 'reader', TRUE), FLOW_PATH_PACKAGES . 'Libraries/gedmo/doctrine-extensions/lib/Gedmo/Translatable/Entity'), 'Gedmo');
             $bootstrap->getObjectManager()->setInstance('TYPO3\\Flow\\Persistence\\Doctrine\\Mapping\\Driver\\FlowAnnotationDriver', $driverChain);
         }
     });
     // 2. Work around a bug in TYPO3\Flow\Persistence\Doctrine\PersistenceManager::onFlush which expects that all objects in the
     //    Doctrine subsystem are entities known to Flow.
     //
     // The line $this->reflectionService->getClassSchema($entity)->getModelType() triggers a fatal error, for get_class($entity) == 'Gedmo\Translatable\Entity\Translation'
     // because this class is known only to Doctrine (see 1. above), but not to the Flow reflection service.
     //
     // As a workaround, we just add an empty placeholder class schema to the Class Schemata cache, right before the class schema is saved
     // inside the TYPO3\Flow\Core\Bootstrap::bootstrapShuttingDown signal (which is fired directly after "finishedCompiletimeRun").
     $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\Flow\\Core\\Bootstrap', 'finishedCompiletimeRun', function () use($bootstrap) {
         $classSchemataCache = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Cache\\CacheManager')->getCache('Flow_Reflection_RuntimeClassSchemata');
         if (!$classSchemataCache->has('Gedmo_Translatable_Entity_Translation')) {
             $classSchemataCache->set('Gedmo_Translatable_Entity_Translation', new ClassSchema('Gedmo\\Translatable\\Entity\\Translation'));
         }
     });
 }
 /**
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap
  */
 public function prepareRealtimeIndexing(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $this->configurationManager = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Configuration\\ConfigurationManager');
     $settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->getPackageKey());
     if (isset($settings['realtimeIndexing']['enabled']) && $settings['realtimeIndexing']['enabled'] === TRUE) {
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectUpdated', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'indexObject');
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectPersisted', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'indexObject');
         $bootstrap->getSignalSlotDispatcher()->connect('Flowpack\\ElasticSearch\\Indexer\\Object\\Signal\\SignalEmitter', 'objectRemoved', 'Flowpack\\ElasticSearch\\Indexer\\Object\\ObjectIndexer', 'removeObject');
     }
 }
Beispiel #3
0
 /**
  * Registers slots for signals in order to be able to index nodes
  *
  * @param Bootstrap $bootstrap
  */
 public function registerIndexingSlots(Bootstrap $bootstrap)
 {
     $configurationManager = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Configuration\\ConfigurationManager');
     $settings = $configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->getPackageKey());
     if (isset($settings['realtimeIndexing']['enabled']) && $settings['realtimeIndexing']['enabled'] === TRUE) {
         $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeAdded', 'TYPO3\\TYPO3CR\\Search\\Indexer\\NodeIndexingManager', 'indexNode');
         $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeUpdated', 'TYPO3\\TYPO3CR\\Search\\Indexer\\NodeIndexingManager', 'indexNode');
         $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeRemoved', 'TYPO3\\TYPO3CR\\Search\\Indexer\\NodeIndexingManager', 'removeNode');
         $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\Neos\\Service\\PublishingService', 'nodePublished', 'TYPO3\\TYPO3CR\\Search\\Indexer\\NodeIndexingManager', 'indexNode', FALSE);
         $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\Flow\\Persistence\\Doctrine\\PersistenceManager', 'allObjectsPersisted', 'TYPO3\\TYPO3CR\\Search\\Indexer\\NodeIndexingManager', 'flushQueues');
     }
 }
Beispiel #4
0
 /**
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeUpdated', 'Nezaniel\\SystemNodes\\Service\\SystemNodeService', 'refreshCacheIfNecessary');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeAdded', 'Nezaniel\\SystemNodes\\Service\\SystemNodeService', 'refreshCacheIfNecessary');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeRemoved', 'Nezaniel\\SystemNodes\\Service\\SystemNodeService', 'refreshCacheIfNecessary');
 }
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $context = $bootstrap->getContext();
     if (!$context->isProduction()) {
         $dispatcher->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step) use($bootstrap, $dispatcher) {
             if ($step->getIdentifier() === 'typo3.flow:systemfilemonitor') {
                 $typoScriptFileMonitor = \TYPO3\Flow\Monitor\FileMonitor::createFileMonitorAtBoot('TypoScript_Files', $bootstrap);
                 $packageManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Package\\PackageManagerInterface');
                 foreach ($packageManager->getActivePackages() as $packageKey => $package) {
                     if ($packageManager->isPackageFrozen($packageKey)) {
                         continue;
                     }
                     $typoScriptPaths = array($package->getResourcesPath() . 'Private/TypoScript', $package->getResourcesPath() . 'Private/TypoScripts');
                     foreach ($typoScriptPaths as $typoScriptPath) {
                         if (is_dir($typoScriptPath)) {
                             $typoScriptFileMonitor->monitorDirectory($typoScriptPath);
                         }
                     }
                 }
                 $typoScriptFileMonitor->detectChanges();
                 $typoScriptFileMonitor->shutdownObject();
             }
             if ($step->getIdentifier() === 'typo3.flow:cachemanagement') {
                 $cacheManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Cache\\CacheManager');
                 $listener = new \TYPO3\TypoScript\Core\Cache\FileMonitorListener($cacheManager);
                 $dispatcher->connect('TYPO3\\Flow\\Monitor\\FileMonitor', 'filesHaveChanged', $listener, 'flushContentCacheOnFileChanges');
             }
         });
     }
 }
Beispiel #6
0
 /**
  * Boot the package. We wire some signals to slots here.
  *
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('Lightwerk\\SurfCaptain\\GitApi\\ApiRequest', 'apiCall', 'Lightwerk\\SurfCaptain\\GitApi\\RequestListener', 'saveApiCall');
     $dispatcher->connect('Lightwerk\\SurfCaptain\\GitApi\\ApiRequest', 'apiCall', 'Lightwerk\\SurfCaptain\\GitApi\\RequestListener', 'logApiCall');
     $dispatcher->connect('Lightwerk\\SurfCaptain\\GitApi\\ApiRequest', 'beforeApiCall', 'Lightwerk\\SurfCaptain\\GitApi\\RequestListener', 'logBeforeApiCall');
 }
Beispiel #7
0
 /**
  * @param Bootstrap $bootstrap
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Configuration\\ConfigurationManager', 'configurationManagerReady', function ($configurationManager) {
         $configurationManager->registerConfigurationType('Sprints');
     });
 }
Beispiel #8
0
 /**
  * Registers slots for signals in order to be able to index nodes
  *
  * @param Bootstrap $bootstrap
  */
 public function registerExtractionSlot(Bootstrap $bootstrap)
 {
     $configurationManager = $bootstrap->getObjectManager()->get(ConfigurationManager::class);
     $settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->getPackageKey());
     if (isset($settings['realtimeExtraction']['enabled']) && $settings['realtimeExtraction']['enabled'] === TRUE) {
         $dispatcher = $bootstrap->getSignalSlotDispatcher();
         $dispatcher->connect(Asset::class, 'assetCreated', ExtractionManager::class, 'extractMetaData');
     }
 }
Beispiel #9
0
 /**
  * Invokes custom PHP code directly after the package manager has been
  * initialized.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     // HitChat Notifier
     $dispatcher->connect('Lightwerk\\SurfRunner\\Service\\DeploymentService', 'deploymentStarted', 'Lightwerk\\SurfRunner\\Notification\\HitChatNotifier', 'deploymentStarted');
     $dispatcher->connect('Lightwerk\\SurfRunner\\Service\\DeploymentService', 'deploymentFinished', 'Lightwerk\\SurfRunner\\Notification\\HitChatNotifier', 'deploymentFinished');
     // Email Notifier
     $dispatcher->connect('Lightwerk\\SurfRunner\\Service\\DeploymentService', 'deploymentStarted', 'Lightwerk\\SurfRunner\\Notification\\EmailNotifier', 'deploymentStarted');
     $dispatcher->connect('Lightwerk\\SurfRunner\\Service\\DeploymentService', 'deploymentFinished', 'Lightwerk\\SurfRunner\\Notification\\EmailNotifier', 'deploymentFinished');
 }
Beispiel #10
0
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Persistence\\Doctrine\\PersistenceManager', 'allObjectsPersisted', 'TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'flushNodeRegistry');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'repositoryObjectsPersisted', 'TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'flushNodeRegistry');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\NodeData', 'nodePathChanged', 'TYPO3\\Flow\\Mvc\\Routing\\RouterCachingService', 'flushCaches');
     $dispatcher->connect('TYPO3\\Flow\\Configuration\\ConfigurationManager', 'configurationManagerReady', function ($configurationManager) {
         $configurationManager->registerConfigurationType('NodeTypes', \TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_DEFAULT);
     });
 }
Beispiel #11
0
 /**
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Mvc\\Dispatcher', 'afterControllerInvocation', function ($request) use($bootstrap) {
         if (!$request instanceof \TYPO3\Flow\Mvc\ActionRequest || $request->getHttpRequest()->isMethodSafe() !== TRUE) {
             $bootstrap->getObjectManager()->get('Radmiraal\\CouchDB\\CouchDBHelper')->flush();
         }
     });
     $dispatcher->connect('TYPO3\\Flow\\Cli\\SlaveRequestHandler', 'dispatchedCommandLineSlaveRequest', 'Radmiraal\\CouchDB\\CouchDBHelper', 'flush');
 }
 /**
  * {@inheritdoc}
  */
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     require_once FLOW_PATH_PACKAGES . '/Libraries/raven/raven/lib/Raven/Autoloader.php';
     \Raven_Autoloader::register();
     $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step, $runlevel) use($bootstrap) {
         if ($step->getIdentifier() === 'typo3.flow:objectmanagement:runtime') {
             // This triggers the initializeObject method
             $bootstrap->getObjectManager()->get('Networkteam\\SentryClient\\ErrorHandler');
         }
     });
 }
Beispiel #13
0
 /**
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step) use($bootstrap) {
         if ($step instanceof \TYPO3\Flow\Core\Booting\Step && $step->getIdentifier() == 'typo3.flow:persistence') {
             /** @var \Doctrine\Common\Persistence\ObjectManager $entityManager */
             $entityManager = $bootstrap->getObjectManager()->get(\Doctrine\Common\Persistence\ObjectManager::class);
             $entityManager->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
         }
     });
 }
Beispiel #14
0
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     # Command Auditing
     $dispatcher->connect('Flow2Lab\\EventSourcing\\Command\\Bus\\InternalCommandBus', 'commandHandlingSuccess', 'Flow2Lab\\EventSourcing\\Auditing\\CommandLogger', 'onCommandHandlingSuccess');
     $dispatcher->connect('Flow2Lab\\EventSourcing\\Command\\Bus\\InternalCommandBus', 'commandHandlingFailure', 'Flow2Lab\\EventSourcing\\Auditing\\CommandLogger', 'onCommandHandlingFailure');
     # Event Auditing
     $dispatcher->connect('Flow2Lab\\EventSourcing\\Event\\Bus\\InternalEventBus', 'eventHandlingSuccess', 'Flow2Lab\\EventSourcing\\Auditing\\EventLogger', 'onEventHandlingSuccess');
     $dispatcher->connect('Flow2Lab\\EventSourcing\\Event\\Bus\\InternalEventBus', 'eventHandlingFailure', 'Flow2Lab\\EventSourcing\\Auditing\\EventLogger', 'onEventHandlingFailure');
     $dispatcher->connect('Flow2Lab\\EventSourcing\\Event\\Bus\\InternalEventBus', 'eventQueueingSuccess', 'Flow2Lab\\EventSourcing\\Auditing\\EventLogger', 'onEventQueueingSuccess');
 }
 /**
  * {@inheritdoc}
  */
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     require_once FLOW_PATH_PACKAGES . '/Libraries/raven/raven/lib/Raven/Autoloader.php';
     \Raven_Autoloader::register();
     $bootstrap->getSignalSlotDispatcher()->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step, $runlevel) use($bootstrap) {
         if ($step->getIdentifier() === 'typo3.flow:objectmanagement:runtime') {
             // This triggers the initializeObject method
             $bootstrap->getObjectManager()->get('Networkteam\\SentryClient\\ErrorHandler');
         }
     });
     // Make Sentry DSN settable via Environment Variables. Only used in context Production/Heroku.
     if (getenv('ENV_SENTRY_DSN')) {
         define('ENV_SENTRY_DSN', getenv('ENV_SENTRY_DSN'));
     }
 }
Beispiel #16
0
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     if (!file_exists(FLOW_PATH_DATA . 'Logs')) {
         Files::createDirectoryRecursively(FLOW_PATH_DATA . 'Logs');
     }
     $monologFactory = LoggerFactory::getInstance();
     $bootstrap->setEarlyInstance(LoggerFactory::class, $monologFactory);
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step) use($bootstrap, $dispatcher) {
         if ($step->getIdentifier() === 'typo3.flow:configuration') {
             /** @var ConfigurationManager $configurationManager */
             $configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
             $monologFactory = LoggerFactory::getInstance();
             $loggerConfigurations = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Flowpack.Monolog');
             $monologFactory->injectConfiguration($loggerConfigurations);
         }
     });
 }
Beispiel #17
0
 /**
  * Sets up xhprof, some directories, the profiler and wires signals to slots.
  *
  * @param Bootstrap $bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     if (($samplingRate = getenv('PHPPROFILER_SAMPLINGRATE')) !== FALSE) {
         $currentSampleValue = mt_rand() / mt_getrandmax();
         if ($currentSampleValue > (double) $samplingRate) {
             return;
         }
     }
     $profiler = Profiler::getInstance();
     $profiler->setConfigurationProvider(function () use($bootstrap) {
         $settings = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Configuration\\ConfigurationManager')->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Sandstorm.PhpProfiler');
         if (!file_exists($settings['plumber']['profilePath'])) {
             Files::createDirectoryRecursively($settings['plumber']['profilePath']);
         }
         return $settings;
     });
     $run = $profiler->start();
     $run->setOption('Context', (string) $bootstrap->getContext());
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $this->connectToSignals($dispatcher, $profiler, $run, $bootstrap);
     $this->connectToNeosSignals($dispatcher, $profiler, $run, $bootstrap);
 }
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $context = $bootstrap->getContext();
     if (!$context->isProduction()) {
         $dispatcher->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step) use($bootstrap, $dispatcher) {
             if ($step->getIdentifier() === 'typo3.flow:systemfilemonitor') {
                 $templateFileMonitor = \TYPO3\Flow\Monitor\FileMonitor::createFileMonitorAtBoot('Fluid_TemplateFiles', $bootstrap);
                 $packageManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Package\\PackageManagerInterface');
                 foreach ($packageManager->getActivePackages() as $packageKey => $package) {
                     if ($packageManager->isPackageFrozen($packageKey)) {
                         continue;
                     }
                     foreach (array('Templates', 'Partials', 'Layouts') as $path) {
                         $templatesPath = $package->getResourcesPath() . 'Private/' . $path;
                         if (is_dir($templatesPath)) {
                             $templateFileMonitor->monitorDirectory($templatesPath);
                         }
                     }
                 }
                 $templateFileMonitor->detectChanges();
                 $templateFileMonitor->shutdownObject();
             }
         });
     }
     // Use a closure to invoke the TemplateCompiler, since the object is not registered during compiletime
     $flushTemplates = function ($identifier, $changedFiles) use($bootstrap) {
         if ($identifier !== 'Flow_ClassFiles') {
             return;
         }
         $objectManager = $bootstrap->getObjectManager();
         if ($objectManager->isRegistered('TYPO3\\Fluid\\Core\\Compiler\\TemplateCompiler')) {
             $templateCompiler = $objectManager->get('TYPO3\\Fluid\\Core\\Compiler\\TemplateCompiler');
             $templateCompiler->flushTemplatesOnViewHelperChanges($changedFiles);
         }
     };
     $dispatcher->connect('TYPO3\\Flow\\Monitor\\FileMonitor', 'filesHaveChanged', $flushTemplates);
 }
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Core\Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Core\Bootstrap $bootstrap)
 {
     $bootstrap->registerRequestHandler(new Cli\SlaveRequestHandler($bootstrap));
     $bootstrap->registerRequestHandler(new Cli\CommandRequestHandler($bootstrap));
     $bootstrap->registerRequestHandler(new Http\RequestHandler($bootstrap));
     if ($bootstrap->getContext()->isTesting()) {
         $bootstrap->registerRequestHandler(new Tests\FunctionalTestRequestHandler($bootstrap));
     }
     $bootstrap->registerCompiletimeCommand('typo3.flow:core:*');
     $bootstrap->registerCompiletimeCommand('typo3.flow:cache:flush');
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Mvc\\Dispatcher', 'afterControllerInvocation', function ($request) use($bootstrap) {
         if (!$request instanceof Mvc\ActionRequest || $request->getHttpRequest()->isMethodSafe() !== TRUE) {
             $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Persistence\\PersistenceManagerInterface')->persistAll();
         } elseif ($request->getHttpRequest()->isMethodSafe()) {
             $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Persistence\\PersistenceManagerInterface')->persistAll(TRUE);
         }
     });
     $dispatcher->connect('TYPO3\\Flow\\Cli\\SlaveRequestHandler', 'dispatchedCommandLineSlaveRequest', 'TYPO3\\Flow\\Persistence\\PersistenceManagerInterface', 'persistAll');
     $dispatcher->connect('TYPO3\\Flow\\Core\\Bootstrap', 'bootstrapShuttingDown', 'TYPO3\\Flow\\Configuration\\ConfigurationManager', 'shutdown');
     $dispatcher->connect('TYPO3\\Flow\\Core\\Bootstrap', 'bootstrapShuttingDown', 'TYPO3\\Flow\\Object\\ObjectManagerInterface', 'shutdown');
     $dispatcher->connect('TYPO3\\Flow\\Core\\Bootstrap', 'bootstrapShuttingDown', 'TYPO3\\Flow\\Reflection\\ReflectionService', 'saveToCache');
     $dispatcher->connect('TYPO3\\Flow\\Command\\CoreCommandController', 'finishedCompilationRun', 'TYPO3\\Flow\\Security\\Policy\\PolicyService', 'savePolicyCache');
     $dispatcher->connect('TYPO3\\Flow\\Command\\DoctrineCommandController', 'afterDatabaseMigration', 'TYPO3\\Flow\\Security\\Policy\\PolicyService', 'initializeRolesFromPolicy');
     $dispatcher->connect('TYPO3\\Flow\\Security\\Authentication\\AuthenticationProviderManager', 'authenticatedToken', function () use($bootstrap) {
         $session = $bootstrap->getObjectManager()->get('TYPO3\\Flow\\Session\\SessionInterface');
         if ($session->isStarted()) {
             $session->renewId();
         }
     });
     $dispatcher->connect('TYPO3\\Flow\\Monitor\\FileMonitor', 'filesHaveChanged', 'TYPO3\\Flow\\Cache\\CacheManager', 'flushSystemCachesByChangedFiles');
     $dispatcher->connect('TYPO3\\Flow\\Tests\\FunctionalTestCase', 'functionalTestTearDown', 'TYPO3\\Flow\\Mvc\\Routing\\RouterCachingService', 'flushCaches');
     $dispatcher->connect('TYPO3\\Flow\\Configuration\\ConfigurationManager', 'configurationManagerReady', function (Configuration\ConfigurationManager $configurationManager) {
         $configurationManager->registerConfigurationType('Views', Configuration\ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_APPEND);
     });
     $dispatcher->connect('TYPO3\\Flow\\Command\\CacheCommandController', 'warmupCaches', 'TYPO3\\Flow\\Configuration\\ConfigurationManager', 'warmup');
 }
Beispiel #20
0
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $bootstrap->registerRequestHandler(new \Debug\Toolbar\Http\RequestHandler($bootstrap));
     if (!file_exists(FLOW_PATH_DATA . 'Logs/Debug')) {
         mkdir(FLOW_PATH_DATA . 'Logs/Debug');
     }
     \Debug\Toolbar\Service\DataStorage::init();
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     \Debug\Toolbar\Service\Collector::setDispatcher($dispatcher);
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\RequestDebugger', 'preToolbarRendering');
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\AopDebugger', 'preToolbarRendering');
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\EnvironmentDebugger', 'preToolbarRendering');
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\SecurityDebugger', 'preToolbarRendering');
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\SignalDebugger', 'preToolbarRendering');
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\SqlDebugger', 'preToolbarRendering');
     // $dispatcher->connect(
     //         'Debug\Toolbar\Http\RequestHandler', 'aboutToRenderDebugToolbar',
     //         'Debug\Toolbar\Debugger\DumpDebugger', 'preToolbarRendering'
     // );
     $dispatcher->connect('Debug\\Toolbar\\Http\\RequestHandler', 'aboutToRenderDebugToolbar', 'Debug\\Toolbar\\Debugger\\LoggingDebugger', 'preToolbarRendering');
     $dispatcher->connect('TYPO3\\Flow\\Http\\Response', 'postProcessResponseContent', 'Debug\\Toolbar\\Toolbar\\View', 'receivePostProcessResponseContent');
     $dispatcher->connect('TYPO3\\Flow\\Mvc\\ActionRequest', 'requestDispatched', 'Debug\\Toolbar\\Debugger\\RequestDebugger', 'collectRequests');
     $dispatcher->connect('TYPO3\\Flow\\Aop\\Advice\\AbstractAdvice', 'adviceInvoked', 'Debug\\Toolbar\\Debugger\\AopDebugger', 'collectAdvices');
 }
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\Flow\\Persistence\\Doctrine\\PersistenceManager', 'allObjectsPersisted', 'TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'flushNodeRegistry');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'repositoryObjectsPersisted', 'TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'flushNodeRegistry');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodePathChanged', function () use($bootstrap) {
         $contextFactory = $bootstrap->getObjectManager()->get('TYPO3\\TYPO3CR\\Domain\\Service\\ContextFactoryInterface');
         /** @var Context $contextInstance */
         foreach ($contextFactory->getInstances() as $contextInstance) {
             $contextInstance->getFirstLevelNodeCache()->flush();
         }
     });
     $dispatcher->connect('TYPO3\\Flow\\Configuration\\ConfigurationManager', 'configurationManagerReady', function (ConfigurationManager $configurationManager) {
         $configurationManager->registerConfigurationType('NodeTypes', ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_DEFAULT, true);
     });
     $context = $bootstrap->getContext();
     if (!$context->isProduction()) {
         $dispatcher->connect('TYPO3\\Flow\\Core\\Booting\\Sequence', 'afterInvokeStep', function ($step) use($bootstrap) {
             if ($step->getIdentifier() === 'typo3.flow:systemfilemonitor') {
                 $nodeTypeConfigurationFileMonitor = \TYPO3\Flow\Monitor\FileMonitor::createFileMonitorAtBoot('TYPO3CR_NodeTypesConfiguration', $bootstrap);
                 $packageManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Package\\PackageManagerInterface');
                 foreach ($packageManager->getActivePackages() as $packageKey => $package) {
                     if ($packageManager->isPackageFrozen($packageKey)) {
                         continue;
                     }
                     if (file_exists($package->getConfigurationPath())) {
                         $nodeTypeConfigurationFileMonitor->monitorDirectory($package->getConfigurationPath(), 'NodeTypes(\\..+)\\.yaml');
                     }
                 }
                 $nodeTypeConfigurationFileMonitor->monitorDirectory(FLOW_PATH_CONFIGURATION, 'NodeTypes(\\..+)\\.yaml');
                 $nodeTypeConfigurationFileMonitor->detectChanges();
                 $nodeTypeConfigurationFileMonitor->shutdownObject();
             }
         });
     }
 }
Beispiel #22
0
 /**
  * Boot the package. We wire some signals to slots here.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeUpdated', 'Sfi\\Encult\\Service\\VimeoService', 'fetchVimeoThumb');
 }
 /**
  * Invokes a single step of this sequence and also invokes all steps registered
  * to be executed after the given step.
  *
  * @param \TYPO3\Flow\Core\Booting\Step $step The step to invoke
  * @param \TYPO3\Flow\Core\Bootstrap $bootstrap
  * @return void
  */
 protected function invokeStep(Step $step, Bootstrap $bootstrap)
 {
     $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', array($step, $this->identifier));
     $identifier = $step->getIdentifier();
     $step($bootstrap);
     $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'afterInvokeStep', array($step, $this->identifier));
     if (isset($this->steps[$identifier])) {
         foreach ($this->steps[$identifier] as $followingStep) {
             $this->invokeStep($followingStep, $bootstrap);
         }
     }
 }
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Core\Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Core\Bootstrap $bootstrap)
 {
     $bootstrap->registerRequestHandler(new Cli\SlaveRequestHandler($bootstrap));
     $bootstrap->registerRequestHandler(new Cli\CommandRequestHandler($bootstrap));
     $bootstrap->registerRequestHandler(new Http\RequestHandler($bootstrap));
     if ($bootstrap->getContext()->isTesting()) {
         $bootstrap->registerRequestHandler(new Tests\FunctionalTestRequestHandler($bootstrap));
     }
     $bootstrap->registerCompiletimeCommand('typo3.flow:core:*');
     $bootstrap->registerCompiletimeCommand('typo3.flow:cache:flush');
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect(\TYPO3\Flow\Mvc\Dispatcher::class, 'afterControllerInvocation', function ($request) use($bootstrap) {
         if ($bootstrap->getObjectManager()->hasInstance(\TYPO3\Flow\Persistence\PersistenceManagerInterface::class)) {
             if (!$request instanceof Mvc\ActionRequest || $request->getHttpRequest()->isMethodSafe() !== true) {
                 $bootstrap->getObjectManager()->get(\TYPO3\Flow\Persistence\PersistenceManagerInterface::class)->persistAll();
             } elseif ($request->getHttpRequest()->isMethodSafe()) {
                 $bootstrap->getObjectManager()->get(\TYPO3\Flow\Persistence\PersistenceManagerInterface::class)->persistAll(true);
             }
         }
     });
     $dispatcher->connect(\TYPO3\Flow\Cli\SlaveRequestHandler::class, 'dispatchedCommandLineSlaveRequest', \TYPO3\Flow\Persistence\PersistenceManagerInterface::class, 'persistAll');
     $context = $bootstrap->getContext();
     if (!$context->isProduction()) {
         $dispatcher->connect(\TYPO3\Flow\Core\Booting\Sequence::class, 'afterInvokeStep', function ($step) use($bootstrap, $dispatcher) {
             if ($step->getIdentifier() === 'typo3.flow:resources') {
                 $publicResourcesFileMonitor = \TYPO3\Flow\Monitor\FileMonitor::createFileMonitorAtBoot('Flow_PublicResourcesFiles', $bootstrap);
                 $packageManager = $bootstrap->getEarlyInstance(\TYPO3\Flow\Package\PackageManagerInterface::class);
                 foreach ($packageManager->getActivePackages() as $packageKey => $package) {
                     if ($packageManager->isPackageFrozen($packageKey)) {
                         continue;
                     }
                     $publicResourcesPath = $package->getResourcesPath() . 'Public/';
                     if (is_dir($publicResourcesPath)) {
                         $publicResourcesFileMonitor->monitorDirectory($publicResourcesPath);
                     }
                 }
                 $publicResourcesFileMonitor->detectChanges();
                 $publicResourcesFileMonitor->shutdownObject();
             }
         });
     }
     $publishResources = function ($identifier, $changedFiles) use($bootstrap) {
         if ($identifier !== 'Flow_PublicResourcesFiles') {
             return;
         }
         $objectManager = $bootstrap->getObjectManager();
         $resourceManager = $objectManager->get(\TYPO3\Flow\Resource\ResourceManager::class);
         $resourceManager->getCollection(ResourceManager::DEFAULT_STATIC_COLLECTION_NAME)->publish();
     };
     $dispatcher->connect(\TYPO3\Flow\Monitor\FileMonitor::class, 'filesHaveChanged', $publishResources);
     $dispatcher->connect(\TYPO3\Flow\Core\Bootstrap::class, 'bootstrapShuttingDown', \TYPO3\Flow\Configuration\ConfigurationManager::class, 'shutdown');
     $dispatcher->connect(\TYPO3\Flow\Core\Bootstrap::class, 'bootstrapShuttingDown', \TYPO3\Flow\Object\ObjectManagerInterface::class, 'shutdown');
     $dispatcher->connect(\TYPO3\Flow\Core\Bootstrap::class, 'bootstrapShuttingDown', \TYPO3\Flow\Reflection\ReflectionService::class, 'saveToCache');
     $dispatcher->connect(\TYPO3\Flow\Command\CoreCommandController::class, 'finishedCompilationRun', \TYPO3\Flow\Security\Authorization\Privilege\Method\MethodPrivilegePointcutFilter::class, 'savePolicyCache');
     $dispatcher->connect(\TYPO3\Flow\Command\CoreCommandController::class, 'finishedCompilationRun', \TYPO3\Flow\Aop\Pointcut\RuntimeExpressionEvaluator::class, 'saveRuntimeExpressions');
     $dispatcher->connect(\TYPO3\Flow\Security\Authentication\AuthenticationProviderManager::class, 'authenticatedToken', function () use($bootstrap) {
         $session = $bootstrap->getObjectManager()->get(\TYPO3\Flow\Session\SessionInterface::class);
         if ($session->isStarted()) {
             $session->renewId();
         }
     });
     $dispatcher->connect(\TYPO3\Flow\Monitor\FileMonitor::class, 'filesHaveChanged', \TYPO3\Flow\Cache\CacheManager::class, 'flushSystemCachesByChangedFiles');
     $dispatcher->connect(\TYPO3\Flow\Tests\FunctionalTestCase::class, 'functionalTestTearDown', \TYPO3\Flow\Mvc\Routing\RouterCachingService::class, 'flushCaches');
     $dispatcher->connect(\TYPO3\Flow\Configuration\ConfigurationManager::class, 'configurationManagerReady', function (Configuration\ConfigurationManager $configurationManager) {
         $configurationManager->registerConfigurationType('Views', Configuration\ConfigurationManager::CONFIGURATION_PROCESSING_TYPE_APPEND);
     });
     $dispatcher->connect(\TYPO3\Flow\Command\CacheCommandController::class, 'warmupCaches', \TYPO3\Flow\Configuration\ConfigurationManager::class, 'warmup');
     $dispatcher->connect(\TYPO3\Fluid\Core\Parser\TemplateParser::class, 'initializeNamespaces', function (TemplateParser $templateParser) use($bootstrap) {
         /** @var PackageManagerInterface $packageManager */
         $packageManager = $bootstrap->getEarlyInstance(\TYPO3\Flow\Package\PackageManagerInterface::class);
         /** @var PackageInterface $package */
         foreach ($packageManager->getActivePackages() as $package) {
             $templateParser->registerNamespace(strtolower($package->getPackageKey()), $package->getNamespace() . '\\ViewHelpers');
         }
     });
     $dispatcher->connect(\TYPO3\Flow\Package\PackageManager::class, 'packageStatesUpdated', function () use($dispatcher) {
         $dispatcher->connect(\TYPO3\Flow\Core\Bootstrap::class, 'bootstrapShuttingDown', \TYPO3\Flow\Cache\CacheManager::class, 'flushCaches');
     });
 }
 /**
  * @param Bootstrap $bootstrap The current bootstrap
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $flushConfigurationCache = function () use($bootstrap) {
         $cacheManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Cache\\CacheManager');
         $cacheManager->getCache('TYPO3_Neos_Configuration_Version')->flush();
     };
     $flushXliffServiceCache = function () use($bootstrap) {
         $cacheManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Cache\\CacheManager');
         $cacheManager->getCache('TYPO3_Neos_XliffToJsonTranslations')->flush();
     };
     $dispatcher->connect('TYPO3\\Flow\\Monitor\\FileMonitor', 'filesHaveChanged', function ($fileMonitorIdentifier, array $changedFiles) use($flushConfigurationCache, $flushXliffServiceCache) {
         switch ($fileMonitorIdentifier) {
             case 'TYPO3CR_NodeTypesConfiguration':
             case 'Flow_ConfigurationFiles':
                 $flushConfigurationCache();
                 break;
             case 'Flow_TranslationFiles':
                 $flushConfigurationCache();
                 $flushXliffServiceCache();
         }
     });
     $dispatcher->connect('TYPO3\\Neos\\Domain\\Model\\Site', 'siteChanged', $flushConfigurationCache);
     $dispatcher->connect('TYPO3\\Neos\\Domain\\Model\\Site', 'siteChanged', 'TYPO3\\Flow\\Mvc\\Routing\\RouterCachingService', 'flushCaches');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeUpdated', 'TYPO3\\Neos\\TypoScript\\Cache\\ContentCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeAdded', 'TYPO3\\Neos\\TypoScript\\Cache\\ContentCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeRemoved', 'TYPO3\\Neos\\TypoScript\\Cache\\ContentCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'beforeNodeMove', 'TYPO3\\Neos\\TypoScript\\Cache\\ContentCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeAdded', NodeUriPathSegmentGenerator::class, '::setUniqueUriPathSegment');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodePropertyChanged', Service\ImageVariantGarbageCollector::class, 'removeUnusedImageVariant');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodePropertyChanged', function (NodeInterface $node, $propertyName) use($bootstrap) {
         if ($propertyName === 'uriPathSegment') {
             NodeUriPathSegmentGenerator::setUniqueUriPathSegment($node);
             $bootstrap->getObjectManager()->get('TYPO3\\Neos\\Routing\\Cache\\RouteCacheFlusher')->registerNodeChange($node);
         }
     });
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodePathChanged', function (NodeInterface $node, $oldPath, $newPath, $recursion) {
         if (!$recursion) {
             NodeUriPathSegmentGenerator::setUniqueUriPathSegment($node);
         }
     });
     $dispatcher->connect('TYPO3\\Neos\\Service\\PublishingService', 'nodePublished', 'TYPO3\\Neos\\TypoScript\\Cache\\ContentCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\Neos\\Service\\PublishingService', 'nodeDiscarded', 'TYPO3\\Neos\\TypoScript\\Cache\\ContentCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodePathChanged', 'TYPO3\\Neos\\Routing\\Cache\\RouteCacheFlusher', 'registerNodePathChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeRemoved', 'TYPO3\\Neos\\Routing\\Cache\\RouteCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\Neos\\Service\\PublishingService', 'nodePublished', 'TYPO3\\Neos\\Routing\\Cache\\RouteCacheFlusher', 'registerNodeChange');
     $dispatcher->connect('TYPO3\\Neos\\Service\\PublishingService', 'nodePublished', function ($node, $targetWorkspace) use($bootstrap) {
         $cacheManager = $bootstrap->getObjectManager()->get(CacheManager::class);
         if ($cacheManager->hasCache('Flow_Persistence_Doctrine')) {
             $cacheManager->getCache('Flow_Persistence_Doctrine')->flush();
         }
     });
     $dispatcher->connect('TYPO3\\Flow\\Persistence\\Doctrine\\PersistenceManager', 'allObjectsPersisted', 'TYPO3\\Neos\\Routing\\Cache\\RouteCacheFlusher', 'commit');
     $dispatcher->connect('TYPO3\\Neos\\Domain\\Service\\SiteService', 'sitePruned', 'TYPO3\\TypoScript\\Core\\Cache\\ContentCache', 'flush');
     $dispatcher->connect('TYPO3\\Neos\\Domain\\Service\\SiteService', 'sitePruned', 'TYPO3\\Flow\\Mvc\\Routing\\RouterCachingService', 'flushCaches');
     $dispatcher->connect('TYPO3\\Neos\\Domain\\Service\\SiteImportService', 'siteImported', 'TYPO3\\TypoScript\\Core\\Cache\\ContentCache', 'flush');
     $dispatcher->connect('TYPO3\\Neos\\Domain\\Service\\SiteImportService', 'siteImported', 'TYPO3\\Flow\\Mvc\\Routing\\RouterCachingService', 'flushCaches');
     // Eventlog
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'beforeNodeCreate', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'beforeNodeCreate');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'afterNodeCreate', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'afterNodeCreate');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeUpdated', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'nodeUpdated');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodeRemoved', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'nodeRemoved');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'beforeNodePropertyChange', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'beforeNodePropertyChange');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'nodePropertyChanged', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'nodePropertyChanged');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'beforeNodeCopy', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'beforeNodeCopy');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'afterNodeCopy', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'afterNodeCopy');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'beforeNodeMove', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'beforeNodeMove');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Node', 'afterNodeMove', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'afterNodeMove');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Service\\Context', 'beforeAdoptNode', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'beforeAdoptNode');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Service\\Context', 'afterAdoptNode', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'afterAdoptNode');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Workspace', 'beforeNodePublishing', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'beforeNodePublishing');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Model\\Workspace', 'afterNodePublishing', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'afterNodePublishing');
     $dispatcher->connect('TYPO3\\Flow\\Persistence\\Doctrine\\PersistenceManager', 'allObjectsPersisted', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'updateEventsAfterPublish');
     $dispatcher->connect('TYPO3\\TYPO3CR\\Domain\\Repository\\NodeDataRepository', 'repositoryObjectsPersisted', 'TYPO3\\Neos\\EventLog\\Integrations\\TYPO3CRIntegrationService', 'updateEventsAfterPublish');
 }
Beispiel #26
0
 /**
  * @param Bootstrap $bootstrap
  *
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect('BJD\\Events\\Service\\EventService', 'attendeeAdded', 'BJD\\Events\\Service\\EventService', 'sendNewAttendeeEmail');
     $dispatcher->connect('BJD\\Events\\Service\\EventService', 'attendeeRemoved', 'BJD\\Events\\Service\\EventService', 'sendAttendeeRemovedEmail');
 }
 /**
  * Initializes the Configuration Manager, the Flow settings and the Environment service
  *
  * @param Bootstrap $bootstrap
  * @return void
  */
 public static function initializeConfiguration(Bootstrap $bootstrap)
 {
     $context = $bootstrap->getContext();
     $packageManager = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Package\\PackageManagerInterface');
     $configurationManager = new \TYPO3\Flow\Configuration\ConfigurationManager($context);
     $configurationManager->injectConfigurationSource(new \TYPO3\Flow\Configuration\Source\YamlSource());
     $configurationManager->loadConfigurationCache();
     $configurationManager->setPackages($packageManager->getActivePackages());
     $settings = $configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Flow');
     $environment = new \TYPO3\Flow\Utility\Environment($context);
     $environment->setTemporaryDirectoryBase($settings['utility']['environment']['temporaryDirectoryBase']);
     $configurationManager->injectEnvironment($environment);
     $packageManager->injectSettings($settings);
     $bootstrap->getSignalSlotDispatcher()->dispatch('TYPO3\\Flow\\Configuration\\ConfigurationManager', 'configurationManagerReady', array($configurationManager));
     $bootstrap->setEarlyInstance('TYPO3\\Flow\\Configuration\\ConfigurationManager', $configurationManager);
     $bootstrap->setEarlyInstance('TYPO3\\Flow\\Utility\\Environment', $environment);
 }
 /**
  * Invokes custom PHP code directly after the package manager has been initialized.
  *
  * @param Bootstrap $bootstrap The current bootstrap
  *
  * @return void
  */
 public function boot(Bootstrap $bootstrap)
 {
     $dispatcher = $bootstrap->getSignalSlotDispatcher();
     $dispatcher->connect(MetaDataManager::class, 'metaDataCollectionUpdated', ContentRepositoryMapper::class, 'mapMetaData');
     $dispatcher->connect(AssetRepository::class, 'assetDeleted', ExtractionManager::class, 'extractMetaData');
 }
 /**
  * Emits a signal that a CLI slave request was dispatched.
  *
  * @return void
  * @Flow\Signal
  */
 protected function emitDispatchedCommandLineSlaveRequest()
 {
     $this->bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'dispatchedCommandLineSlaveRequest', []);
 }
 /**
  * Signals that the functional test case has been executed
  *
  * @return void
  * @Flow\Signal
  */
 protected function emitFunctionalTestTearDown()
 {
     self::$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'functionalTestTearDown');
 }