Author: Jonathan.Wage
Date: 2010-02-17 01:12:03 +0100 (Wed, 17 Feb 2010)
New Revision: 28064
Modified:
plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php
plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalContentListPlugin/config/sfSympalContentListPluginConfiguration.class.php
plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
plugins/sfSympalPlugin/trunk/test/fixtures/project/apps/sympal/config/app.yml
plugins/sfSympalPlugin/trunk/test/unit/ConfigurationTest.php
Log:
[1.4][sfSympalPlugin][1.0] Fixes for installer
Modified:
plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php
2010-02-16 23:02:39 UTC (rev 28063)
+++ plugins/sfSympalPlugin/trunk/config/sfSympalPluginConfiguration.class.php
2010-02-17 00:12:03 UTC (rev 28064)
@@ -64,7 +64,6 @@
public static function enableSympalPlugins(ProjectConfiguration
$configuration)
{
require_once(dirname(__FILE__).'/../lib/sfSympalPluginEnabler.class.php');
-
require_once(dirname(__FILE__).'/../lib/events/sfSympalListener.class.php');
$enabler = new sfSympalPluginEnabler($configuration);
$enabler->enableSympalPlugins();
Modified:
plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php
2010-02-16 23:02:39 UTC (rev 28063)
+++
plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php
2010-02-17 00:12:03 UTC (rev 28064)
@@ -17,11 +17,12 @@
$this->_dispatcher->notify(new sfEvent($record,
'sympal.user.set_table_definition', array('object' => $record)));
$this->_symfonyContext = $event->getSubject();
- $this->_invoker->setCache(new sfSympalCache($this->_invoker));
- $this->_invoker->setSymfonyContext($this->_symfonyContext);
+
$this->_invoker->setProjectConfiguration($this->_symfonyContext->getConfiguration());
$this->_sympalContext =
sfSympalContext::createInstance($this->_symfonyContext, $this->_invoker);
$this->_invoker->setSympalContext($this->_sympalContext);
+ $this->_invoker->setSymfonyContext($this->_symfonyContext);
+ $this->_invoker->setCache(new sfSympalCache($this->_invoker));
$this->_enableModules();
$this->_checkInstalled();
@@ -45,7 +46,17 @@
$helpers[] = 'Admin';
}
- $this->_invoker->getProjectConfiguration()->loadHelpers($helpers);
+ $this->_invoker->getProjectConfiguration()->loadHelpers($helpers);
+
+ new sfSympalComponentMethodNotFoundListener($this->_dispatcher,
$this->_invoker);
+ new sfSympalControllerChangeActionListener($this->_dispatcher,
$this->_invoker);
+ new sfSympalTemplateFilterParametersListener($this->_dispatcher,
$this->_invoker);
+ new sfSympalFormMethodNotFoundListener($this->_dispatcher,
$this->_invoker);
+ new sfSympalFormPostConfigureListener($this->_dispatcher, $this->_invoker);
+ new sfSympalFormFilterValuesListener($this->_dispatcher, $this->_invoker);
+ new sfSympalTaskClearCacheListener($this->_dispatcher, $this->_invoker);
+
+ $this->_dispatcher->notify(new sfEvent($this, 'sympal.load'));
}
/**
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalContentListPlugin/config/sfSympalContentListPluginConfiguration.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalContentListPlugin/config/sfSympalContentListPluginConfiguration.class.php
2010-02-16 23:02:39 UTC (rev 28063)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalContentListPlugin/config/sfSympalContentListPluginConfiguration.class.php
2010-02-17 00:12:03 UTC (rev 28064)
@@ -17,8 +17,12 @@
*/
public function initialize()
{
+ $this->dispatcher->connect('sympal.load', array($this,
'listenToSympalLoad'));
+ }
+
+ public function listenToSympalLoad()
+ {
new sfSympalContentListFilterVariablesListener($this->dispatcher, $this);
new sfSympalContentListUnknownFormatListener($this->dispatcher, $this);
}
-
}
Modified: plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
2010-02-16 23:02:39 UTC (rev 28063)
+++ plugins/sfSympalPlugin/trunk/lib/sfSympalConfiguration.class.php
2010-02-17 00:12:03 UTC (rev 28064)
@@ -32,12 +32,24 @@
$this->_initializeSymfonyConfig();
$this->_markClassesAsSafe();
- $this->_connectEvents();
$this->_configureSuperCache();
$this->_configureDoctrine();
+
+ new sfSympalContextLoadFactoriesListener($this->_dispatcher, $this);
}
/**
+ * Set the project configuration instance for sympal
+ *
+ * @param ProjectConfiguration $projectConfiguration
+ * @return void
+ */
+ public function setProjectConfiguration(ProjectConfiguration
$projectConfiguration)
+ {
+ $this->_projectConfiguration = $projectConfiguration;
+ }
+
+ /**
* Initialize some sfConfig values for Sympal
*
* @return void
@@ -103,23 +115,6 @@
}
/**
- * Connect to various events required by Sympal
- *
- * @return void
- */
- private function _connectEvents()
- {
- new sfSympalContextLoadFactoriesListener($this->_dispatcher, $this);
- new sfSympalComponentMethodNotFoundListener($this->_dispatcher, $this);
- new sfSympalControllerChangeActionListener($this->_dispatcher, $this);
- new sfSympalTemplateFilterParametersListener($this->_dispatcher, $this);
- new sfSympalFormMethodNotFoundListener($this->_dispatcher, $this);
- new sfSympalFormPostConfigureListener($this->_dispatcher, $this);
- new sfSympalFormFilterValuesListener($this->_dispatcher, $this);
- new sfSympalTaskClearCacheListener($this->_dispatcher, $this);
- }
-
- /**
* Configure super cache if enabled
*
* @return void
Modified:
plugins/sfSympalPlugin/trunk/test/fixtures/project/apps/sympal/config/app.yml
===================================================================
---
plugins/sfSympalPlugin/trunk/test/fixtures/project/apps/sympal/config/app.yml
2010-02-16 23:02:39 UTC (rev 28063)
+++
plugins/sfSympalPlugin/trunk/test/fixtures/project/apps/sympal/config/app.yml
2010-02-17 00:12:03 UTC (rev 28064)
@@ -1,5 +1,6 @@
all:
sympal_config:
+ language_codes: [en, fr, es]
breadcrumbs_separator: ' / '
plugin_api:
username: test
Modified: plugins/sfSympalPlugin/trunk/test/unit/ConfigurationTest.php
===================================================================
--- plugins/sfSympalPlugin/trunk/test/unit/ConfigurationTest.php
2010-02-16 23:02:39 UTC (rev 28063)
+++ plugins/sfSympalPlugin/trunk/test/unit/ConfigurationTest.php
2010-02-17 00:12:03 UTC (rev 28064)
@@ -13,7 +13,7 @@
$app = 'sympal';
require_once(dirname(__FILE__).'/../bootstrap/unit.php');
-$t = new lime_test(15, new lime_output_color());
+$t = new lime_test(21, new lime_output_color());
$sympalPluginConfiguration =
sfContext::getInstance()->getConfiguration()->getPluginConfiguration('sfSympalPlugin');
$sympalConfiguration = $sympalPluginConfiguration->getSympalConfiguration();
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.