Author: Jonathan.Wage
Date: 2010-04-11 05:25:09 +0200 (Sun, 11 Apr 2010)
New Revision: 29072
Modified:
plugins/sfSympalPlugin/trunk/data/fixtures/install.yml
plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCacheManager.class.php
plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAdminPlugin/modules/sympal_content_types/config/generator.yml
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/config/doctrine/schema.yml
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/lib/form/doctrine/PluginsfSympalContentTypeForm.class.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/manager/sfSympalPluginManagerInstall.class.php
plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
plugins/sfSympalPlugin/trunk/test/unit/config/sfSympalConfigurationTest.php
plugins/sfSympalPlugin/trunk/test/unit/sfSympalDataGridPlugin/sfSympalDataGridTest.php
plugins/sfSympalPlugin/trunk/test/unit/sfSympalPluginManagerPlugin/PluginManager2Test.php
Log:
[sfSympalPlugin] Synchronizing git repository to Symfony Plugins SVN
Modified: plugins/sfSympalPlugin/trunk/data/fixtures/install.yml
===================================================================
--- plugins/sfSympalPlugin/trunk/data/fixtures/install.yml 2010-04-11
02:23:39 UTC (rev 29071)
+++ plugins/sfSympalPlugin/trunk/data/fixtures/install.yml 2010-04-11
03:25:09 UTC (rev 29072)
@@ -6,7 +6,6 @@
sfSympalContentType:
ContentType_Page:
- plugin_name: sfSympalPagesPlugin
name: sfSympalPage
slug: page
description: The page content type is the default Sympal content type. It
is a simple page that only consists of a title and body. The contents of the
body are a sympal content slot that can be filled with your selected type of
content.
@@ -19,7 +18,6 @@
<?php endif; ?>
ContentType_ContentList:
- plugin_name: sfSympalContentListPlugin
name: sfSympalContentList
slug: content-list
description: The content list content type is the default Sympal content
type for displaying lists of content.
Modified: plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCacheManager.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCacheManager.class.php
2010-04-11 02:23:39 UTC (rev 29071)
+++ plugins/sfSympalPlugin/trunk/lib/cache/sfSympalCacheManager.class.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -139,73 +139,6 @@
}
/**
- * Get the cached layouts array
- *
- * @return array $layouts
- */
- public function getLayouts()
- {
- throw new sfException('@TODO - Must be reimplemented');
- if ($this->_layouts === null)
- {
- $this->_layouts = $this->get('layouts');
- }
-
- return $this->_layouts;
- }
-
- /**
- * Get the cached helper methods and paths
- *
- * @return array $helpers
- */
- public function getHelperAutoload()
- {
- throw new sfException('@TODO Needs to be reimplemented');
- if ($this->_helperAutoload === null)
- {
- $this->_helperAutoload = $this->get('helper_autoload');
- }
-
- return $this->_helperAutoload;
- }
-
- /**
- * 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
- */
- protected function _writeHelperAutoloadCache()
- {
- throw new sfException('@TODO Needs to be reimplemented');
- $cache = array();
- $dirs = $this->_projectConfiguration->getHelperDirs();
- foreach ($dirs as $dir)
- {
- $helpers = sfFinder::type('file')->name('*Helper.php')->in($dir);
- foreach ($helpers as $helper)
- {
- $lines = file($helper);
- foreach ($lines as $line)
- {
- preg_match("/function (.*)\(/", $line, $matches);
- if ($matches)
- {
- $function = $matches[1];
- $e = explode('(', $function);
- $function = $e[0];
- $cache[$function] = $helper;
- }
- }
- }
- }
- $this->set('helper_autoload', $cache);
- }
-
- /**
* @see sfCache::remove()
*/
public function remove($key)
Modified:
plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php
2010-04-11 02:23:39 UTC (rev 29071)
+++ plugins/sfSympalPlugin/trunk/lib/config/sfSympalConfiguration.class.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -116,30 +116,6 @@
}
/**
- * Get array of plugins which contain a content type
- *
- * @return array $contentTypePlugins
- */
- public function getContentTypePlugins()
- {
- if ($this->_contentTypePlugins === null)
- {
- $this->_contentTypePlugins = array();
- $plugins = $this->getPluginPaths();
-
- foreach ($plugins as $plugin => $path)
- {
- $manager = new sfSympalPluginManager($plugin,
$this->_projectConfiguration, new sfFormatter());
- if ($contentType = $manager->getContentTypeForPlugin())
- {
- $this->_contentTypePlugins[] = $plugin;
- }
- }
- }
- return $this->_contentTypePlugins;
- }
-
- /**
* Get array of plugins that are downloaded and installed to your project
*
* @return array $installedPlugins
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAdminPlugin/modules/sympal_content_types/config/generator.yml
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAdminPlugin/modules/sympal_content_types/config/generator.yml
2010-04-11 02:23:39 UTC (rev 29071)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalAdminPlugin/modules/sympal_content_types/config/generator.yml
2010-04-11 03:25:09 UTC (rev 29072)
@@ -24,11 +24,9 @@
class: false
form:
display:
- "Content Type": [label, name, description, default_path,
plugin_name, slug]
+ "Content Type": [label, name, description, default_path, slug]
"Rendering": [template, theme, module, action]
fields:
- plugin_name:
- help: The name of the plugin that contains the content type.
name:
help: The Doctrine model name for the content type.
label:
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/config/doctrine/schema.yml
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/config/doctrine/schema.yml
2010-04-11 02:23:39 UTC (rev 29071)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/config/doctrine/schema.yml
2010-04-11 03:25:09 UTC (rev 29072)
@@ -147,9 +147,6 @@
label:
type: string(255)
notnull: true
- plugin_name:
- type: string(255)
- notnull: true
default_path: string(255)
theme: string(255)
template: string(255)
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/lib/form/doctrine/PluginsfSympalContentTypeForm.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/lib/form/doctrine/PluginsfSympalContentTypeForm.class.php
2010-04-11 02:23:39 UTC (rev 29071)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalCMFPlugin/lib/form/doctrine/PluginsfSympalContentTypeForm.class.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -13,13 +13,6 @@
{
parent::setup();
- $plugins =
sfSympalContext::getInstance()->getSympalConfiguration()->getContentTypePlugins();
- $plugins = array_combine($plugins, $plugins);
- $plugins = array_merge(array('' => ''), $plugins);
-
- $this->widgetSchema['plugin_name'] = new
sfWidgetFormChoice(array('choices' => $plugins));
- $this->widgetSchema['plugin_name']->setLabel('Plugin');
-
$field =
sfSympalContext::getInstance()->getService('theme_form_toolkit')->getThemeWidgetAndValidator();
$this->widgetSchema['theme'] = $field['widget'];
$this->validatorSchema['theme'] = $field['validator'];
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/manager/sfSympalPluginManagerInstall.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/manager/sfSympalPluginManagerInstall.class.php
2010-04-11 02:23:39 UTC (rev 29071)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalPluginManagerPlugin/lib/manager/sfSympalPluginManagerInstall.class.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -112,9 +112,7 @@
$lowerName = str_replace('-', '_',
Doctrine_Inflector::urlize(str_replace('sfSympal', null,
$this->_contentTypeName)));
$slug = 'sample_'.$lowerName;
- $properties = array(
- 'plugin_name' => $this->_pluginName,
- );
+ $properties = array();
$contentType = $this->newContentType($this->_contentTypeName, $properties);
$installVars['contentType'] = $contentType;
Modified: plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
2010-04-11 02:23:39 UTC (rev 29071)
+++ plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -202,31 +202,7 @@
throw new sfException('Could not find component or partial for the module
"'.$module.'" and action "'.$action.'"');
}
- protected static $_helperAutoloadCache = null;
-
/**
- * Autoload the helper file for a helper function
- *
- * @param string $functionName
- * @return void
- */
- public static function autoloadHelper($functionName)
- {
- if (is_null(self::$_helperAutoloadCache))
- {
- self::$_helperAutoloadCache =
sfSympalContext::getInstance()->getSympalConfiguration()->getCache()->getHelperAutoload();
- }
- if (isset(self::$_helperAutoloadCache[$functionName]))
- {
- require_once(self::$_helperAutoloadCache[$functionName]);
- }
- else
- {
- throw new sfException('Could not autoload helper for function
"'.$functionName.'"');
- }
- }
-
- /**
* Check if a module and action exist
*
* @param string $moduleName
Modified:
plugins/sfSympalPlugin/trunk/test/unit/config/sfSympalConfigurationTest.php
===================================================================
--- plugins/sfSympalPlugin/trunk/test/unit/config/sfSympalConfigurationTest.php
2010-04-11 02:23:39 UTC (rev 29071)
+++ plugins/sfSympalPlugin/trunk/test/unit/config/sfSympalConfigurationTest.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -13,7 +13,7 @@
$app = 'sympal';
require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
-$t = new lime_test(20);
+$t = new lime_test(19);
$sympalPluginConfiguration =
sfContext::getInstance()->getConfiguration()->getPluginConfiguration('sfSympalPlugin');
$sympalConfiguration = $sympalPluginConfiguration->getSympalConfiguration();
@@ -89,13 +89,6 @@
$layouts = $sympalConfiguration->getLayouts();
$t->is(in_array('sympal', $layouts), true, '->getLayouts() returns an array
with "sympal" as one of its entries');
-
-$contentTypePlugins = $sympalConfiguration->getContentTypePlugins();
-$t->is($contentTypePlugins, array(
- 'sfSympalBlogPlugin',
- 'sfSympalPagesPlugin',
- 'sfSympalContentListPlugin'
-), '->getContentTypePlugins() returns the correct array of plugins with
content typed defined');
$allManageablePlugins = $sympalConfiguration->getAllManageablePlugins();
$t->is(in_array('sfSympalBlogPlugin', $allManageablePlugins), true,
'->getAllManageablePlugins() returns the correct array of plugins');
Modified:
plugins/sfSympalPlugin/trunk/test/unit/sfSympalDataGridPlugin/sfSympalDataGridTest.php
===================================================================
---
plugins/sfSympalPlugin/trunk/test/unit/sfSympalDataGridPlugin/sfSympalDataGridTest.php
2010-04-11 02:23:39 UTC (rev 29071)
+++
plugins/sfSympalPlugin/trunk/test/unit/sfSympalDataGridPlugin/sfSympalDataGridTest.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -42,7 +42,6 @@
'c.name' => 'sfSympalPage',
'c.description' => 'The page content type is the default Sympal content
type. It is a simple page that only consists of a title and body. The contents
of the body are a sympal content slot that can be filled with your selected
type of content.',
'c.label' => 'Page',
- 'c.plugin_name' => 'sfSympalPagesPlugin',
'c.default_path' => '/pages/:slug',
'c.theme' => NULL,
'c.template' => 'default_view',
Modified:
plugins/sfSympalPlugin/trunk/test/unit/sfSympalPluginManagerPlugin/PluginManager2Test.php
===================================================================
---
plugins/sfSympalPlugin/trunk/test/unit/sfSympalPluginManagerPlugin/PluginManager2Test.php
2010-04-11 02:23:39 UTC (rev 29071)
+++
plugins/sfSympalPlugin/trunk/test/unit/sfSympalPluginManagerPlugin/PluginManager2Test.php
2010-04-11 03:25:09 UTC (rev 29072)
@@ -3,7 +3,7 @@
$app = 'sympal';
require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
-$t = new lime_test(25);
+$t = new lime_test(24);
$configuration->loadHelpers(array('I18N'));
@@ -18,7 +18,6 @@
$contentType =
Doctrine_Core::getTable('sfSympalContentType')->findOneByName($contentTypeName);
$t->is($contentType['name'], $contentTypeName, 'Test content type name set');
$t->is($contentType['label'],
sfInflector::humanize(sfInflector::tableize(str_replace('sfSympal', null,
$contentTypeName))), 'Test content type label set');
- $t->is($contentType['plugin_name'], $name, 'Test content type plugin name
set');
$contentList =
Doctrine_Core::getTable('sfSympalContentList')->findOneByContentTypeId($contentType['id']);
$t->is($contentList instanceof sfSympalContentList, true, 'Test sample
content list was created.');
--
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.