Commit edfd9f65 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 68d12596
......@@ -1165,15 +1165,14 @@ class Doctrine_Export extends Doctrine_Connection_Module
}
/**
* exportPluginsSql
* exports plugin tables for given table
* fetches all plugins recursively for given table
*
* @param Doctrine_Table $table the table in which the plugins belong to
* @return array an array of sql strings
*/
public function exportPluginsSql(Doctrine_Table $table)
* @param Doctrine_Table $table table object to retrieve the plugins from
* @return array an array of Doctrine_Plugin objects
*/
public function getAllPlugins(Doctrine_Table $table)
{
$sql = array();
$plugins = array();
foreach ($table->getTemplates() as $name => $template) {
$plugin = $template->getPlugin();
......@@ -1182,6 +1181,26 @@ class Doctrine_Export extends Doctrine_Connection_Module
continue;
}
$plugins[] = $plugin;
$plugins = array_merge($plugins, $this->getAllPlugins($plugin->getOption('pluginTable')));
}
return $plugins;
}
/**
* exportPluginsSql
* exports plugin tables for given table
*
* @param Doctrine_Table $table the table in which the plugins belong to
* @return array an array of sql strings
*/
public function exportPluginsSql(Doctrine_Table $table)
{
$sql = array();
foreach ($this->getAllPlugins($table) as $name => $plugin) {
$table = $plugin->getOption('pluginTable');
// Make sure plugin has a valid table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment