CRM-13244 - ActionSchedule - Extract entity-specific logic for tokens and dropdowns.
[civicrm-core.git] / Civi / Core / Container.php
index 6c3f0955ba96a97eb0ec66f6eebb13b4a149062d..fa7fe74994879e346d770ab0aec30db7a323b137 100644 (file)
@@ -183,6 +183,7 @@ class Container {
       'resources' => 'CRM_Core_Resources',
       'httpClient' => 'CRM_Utils_HttpClient',
       'cache.default' => 'CRM_Utils_Cache',
+      'i18n' => 'CRM_Core_I18n',
       // Maybe? 'config' => 'CRM_Core_Config',
       // Maybe? 'smarty' => 'CRM_Core_Smarty',
     );
@@ -193,6 +194,16 @@ class Container {
         ->setFactoryClass($class)->setFactoryMethod('singleton');
     }
 
+    $container->setDefinition('civi_token_compat', new Definition(
+      'Civi\Token\TokenCompatSubscriber',
+      array()
+    ))->addTag('kernel.event_subscriber');
+
+    $container->setDefinition('actionscheduletmp', new Definition(
+      'CRM_Core_ActionScheduleTmp',
+      array()
+    ))->addTag('kernel.event_subscriber');
+
     \CRM_Utils_Hook::container($container);
 
     return $container;
@@ -207,7 +218,7 @@ class Container {
 
   /**
    * @param ContainerInterface $container
-   * @return \Symfony\Component\EventDispatcher\EventDispatcher
+   * @return \Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
    */
   public function createEventDispatcher($container) {
     $dispatcher = new ContainerAwareEventDispatcher($container);