Author: Jonathan.Wage Date: 2010-03-27 16:50:09 +0100 (Sat, 27 Mar 2010) New Revision: 28826
Added: plugins/sfSympalPlugin/trunk/i18n/messages.es.xml plugins/sfSympalPlugin/trunk/i18n/sf_admin.es.xml plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.es.xml Modified: plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCache.class.php plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php plugins/sfSympalPlugin/trunk/lib/events/sfSympalListener.class.php plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.fr.xml Log: [sfSympalPlugin] Synchronizing git repository to Symfony Plugins SVN Added: plugins/sfSympalPlugin/trunk/i18n/messages.es.xml =================================================================== --- plugins/sfSympalPlugin/trunk/i18n/messages.es.xml (rev 0) +++ plugins/sfSympalPlugin/trunk/i18n/messages.es.xml 2010-03-27 15:50:09 UTC (rev 28826) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > +<xliff version="1.0"> + <file original="global" source-language="en" datatype="plaintext"> + <header/> + <body> + <trans-unit> + <source>Theme</source> + <target>Tema</target> + </trans-unit> + <trans-unit> + <source>Redirects</source> + <target>Redirectos</target> + </trans-unit> + </body> + </file> +</xliff> Added: plugins/sfSympalPlugin/trunk/i18n/sf_admin.es.xml =================================================================== --- plugins/sfSympalPlugin/trunk/i18n/sf_admin.es.xml (rev 0) +++ plugins/sfSympalPlugin/trunk/i18n/sf_admin.es.xml 2010-03-27 15:50:09 UTC (rev 28826) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > +<xliff version="1.0"> + <file original="global" source-language="en" datatype="plaintext"> + <header/> + <body> + <trans-unit> + <source>Delete</source> + <target>Borrar</target> + </trans-unit> + <trans-unit> + <source>Save</source> + <target>Guardar</target> + </trans-unit> + <trans-unit> + <source>Back to list</source> + <target>Volver a la lista</target> + </trans-unit> + </body> + </file> +</xliff> Modified: plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCache.class.php =================================================================== --- plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCache.class.php 2010-03-27 03:00:06 UTC (rev 28825) +++ plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCache.class.php 2010-03-27 15:50:09 UTC (rev 28826) @@ -18,7 +18,6 @@ { protected $_sympalConfiguration, - $_contentTypes = null, $_helperAutoload = null, $_modules = null, $_layouts = null; @@ -78,7 +77,6 @@ */ public function clear() { - $this->_contentTypes = null; $this->_helperAutoload = null; $this->_modules = null; $this->_layouts = null; @@ -176,7 +174,10 @@ } /** - * Write the helper autoaload cache + * Write the helper autoload cache + * + * This caches an array of function names (e.g. url_for) and the file + * that contains that method (e.g. UrlHelper.php) * * @return void */ Modified: plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php =================================================================== --- plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php 2010-03-27 03:00:06 UTC (rev 28825) +++ plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php 2010-03-27 15:50:09 UTC (rev 28826) @@ -230,17 +230,6 @@ } /** - * Set the project configuration instance to use - * - * @param ProjectConfiguration $projectConfiguration - * @return void - */ - public function setProjectConfiguration(ProjectConfiguration $projectConfiguration) - { - $this->_projectConfiguration = $projectConfiguration; - } - - /** * Get array of core Sympal plugins * * @return array $corePlugins @@ -327,6 +316,8 @@ /** * Get paths to all Sympal plugins + * + * A Sympal plugin is defined as any that contains "sfSympal" in its name * * @return array $pluginPaths */ @@ -334,8 +325,7 @@ { if ($this->_pluginPaths === null) { - $configuration = ProjectConfiguration::getActive(); - $pluginPaths = $configuration->getAllPluginPaths(); + $pluginPaths = $this->getProjectConfiguration()->getAllPluginPaths(); $this->_pluginPaths = array(); foreach ($pluginPaths as $pluginName => $path) { Modified: plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php =================================================================== --- plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php 2010-03-27 03:00:06 UTC (rev 28825) +++ plugins/sfSympalPlugin/trunk/lib/events/sfSympalContextLoadFactoriesListener.class.php 2010-03-27 15:50:09 UTC (rev 28826) @@ -1,25 +1,41 @@ <?php +/** + * Handles all the sympal functionality that needs to fire on the context.load_factories event + * + * @package sfSympalPlugin + * @subpackage listener + * @author Jonathan H. Wage <[email protected]> + * @since 2010-03-26 + * @version svn:$Id$ $Author$ + */ class sfSympalContextLoadFactoriesListener extends sfSympalListener { private $_symfonyContext, $_sympalContext; + /** + * @see sfSympalListener + */ public function getEventName() { return 'context.load_factories'; } + /** + * The callback on the context.load_factories event. + * + * The subject is sfContext and the invoker (in normal cases) will + * be sfSympalConfiguration + */ public function run(sfEvent $event) { - $record = Doctrine_Core::getTable(sfSympalConfig::get('user_model'))->getRecordInstance(); - $this->_dispatcher->notify(new sfEvent($record, 'sympal.user.set_table_definition', array('object' => $record))); + $this->_initiateUserTable(); $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); @@ -58,6 +74,19 @@ new sfSympalFormPostConfigureListener($this->_dispatcher, $this->_invoker); new sfSympalFormFilterValuesListener($this->_dispatcher, $this->_invoker); } + + /** + * Initiates the user model and throws the sympal.user.set_table_definition event. + * + * Ths idea is that the user model hasn't been loaded yet, so it'll be + * loaded here for the first time, and this allows a hook into its + * table definition. + */ + protected _initiateUserTable() + { + $record = Doctrine_Core::getTable(sfSympalConfig::get('user_model'))->getRecordInstance(); + $this->_dispatcher->notify(new sfEvent($record, 'sympal.user.set_table_definition', array('object' => $record))); + } /** * Handle the enabling of modules. Either enables all modules or only the configured modules. Modified: plugins/sfSympalPlugin/trunk/lib/events/sfSympalListener.class.php =================================================================== --- plugins/sfSympalPlugin/trunk/lib/events/sfSympalListener.class.php 2010-03-27 03:00:06 UTC (rev 28825) +++ plugins/sfSympalPlugin/trunk/lib/events/sfSympalListener.class.php 2010-03-27 15:50:09 UTC (rev 28826) @@ -11,6 +11,8 @@ * sfSympalListener, define methods getEventName() and run() then create an instance * to register it. * + * @package sfSympalPlugin + * @subpackage listener * @author Maxim Tsepkov <[email protected]> * @author Jonathan H. Wage <[email protected]> */ Added: plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.es.xml =================================================================== --- plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.es.xml (rev 0) +++ plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.es.xml 2010-03-27 15:50:09 UTC (rev 28826) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > +<xliff version="1.0"> + <file original="global" source-language="en" datatype="plaintext"> + <header/> + <body> + <trans-unit> + <source>Your Sympal installation is already up to date at %s!</source> + <target>Tu instalación ya está a la versión corriente (%s)!</target> + </trans-unit> + </body> + </file> +</xliff> Modified: plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.fr.xml =================================================================== --- plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.fr.xml 2010-03-27 03:00:06 UTC (rev 28825) +++ plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalUpgradePlugin/i18n/messages.fr.xml 2010-03-27 15:50:09 UTC (rev 28826) @@ -13,7 +13,7 @@ <target>Pas de mise à jour trouvée</target> </trans-unit> <trans-unit> - <source>Continuing will ewexute the following Sympal upgrade tasks:</source> + <source>Continuing will execute the following Sympal upgrade tasks:</source> <target>Les tâches suivantes seront effectuées :</target> </trans-unit> <trans-unit> -- 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.
